Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / November 2004

Tip: Looking for answers? Try searching our database.

Cache User Controls for each user

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fabio Gouw - 17 Nov 2004 12:49 GMT
Hello,

can I have the User Controls cached by each user? I have an dinamic menu
that's is built for each user, and the code for its filling is executed every
postback, so I'd like to put it in cache, but each user must have his/her own
User Control cached.

Is it possible?

Thanks
Ben Strackany - 19 Nov 2004 23:15 GMT
Sure. You could assign a unique value to each user & ensure it's in the
querystring, cache the user control to varybyparam, then your user controls
would get cached per user.

You can also use outputcache & varybycustom & write your own getvarybycustom
function to vary by user (IP? unique ID in cookie? something

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/c
pconOutputCache.asp
).

You could also cache data/etc for the user in session, & just rebuild the
control from that data each time. You didn't say where the performance issue
was, so session storage may not be appropriate.

Signature

Ben Strackany
www.developmentnow.com

<a href="http://www.developmentnow.com">dn</a>

> Hello,
>
[quoted text clipped - 6 lines]
>
> Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.