HighTechTalks DotNet Forums  

Cache User Controls for each user

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss Cache User Controls for each user in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Fabio Gouw
 
Posts: n/a

Default Cache User Controls for each user - 11-17-2004 , 07:49 AM






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

Reply With Quote
  #2  
Old   
Ben Strackany
 
Posts: n/a

Default Re: Cache User Controls for each user - 11-19-2004 , 06:15 PM






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/de...tputCache.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.

--
Ben Strackany
www.developmentnow.com

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


"Fabio Gouw" <FabioGouw (AT) discussions (DOT) microsoft.com> wrote

Quote:
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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.