Cache User Control in Web Part

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello everyone,

What is the best way to cache a 2.0 web part?

I tried putting output cache on the user control in the part, but the
output cache cannot be wrapped by a generic web part . . . any ideas?

I'm new to caching to begin with and I am at a loss. Because of the
control, data caching wouldn't really be a good option. Maybe if I get
the rendered html code from the control, put that in cache, then
render
that in a literal control . . . that seems a little silly (if it would
even work).

Thanks for any advice,
Ryan

.



Relevant Pages

  • Re: Cache User Control in Web Part
    ... Thanks Alvin! ... Maybe I am confused on the point of output cache. ... data caching wouldn't really be a good option. ... the rendered html code from thecontrol, put that incache, then ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cache User Control in Web Part
    ... I thought that is what output cache is for. ... control, data caching wouldn't really be a good option. ... the rendered html code from thecontrol, put that incache, then ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: registering javascript
    ... Is it possible that you use output cache for that control? ... The script doesn't appear on the ... parent page?? ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Cache User Control in Web Part
    ... As a general rule, you don't cache the web part, you cache the data in the ... I tried putting output cache on the user control in the part, ... data caching wouldn't really be a good option. ... the rendered html code from the control, put that in cache, then ...
    (microsoft.public.dotnet.framework.aspnet)