Caching User Controls Question

  • Thread starter Thread starter Z D
  • Start date Start date
Z

Z D

Hello,

I have a question about caching web user controls in ASP.NET.

I have a few user controls that are VERY expensive to create, but they do
not change very often. They only change when a user modifies certain things
in the application. The intervals between changes could be a few hours, or
a few days. It all depends on how often the user makes certain changes.

The important thing is that as soon as the user makes these certain changes,
the data in the control must be re-computed because it is no longer valid.

The question I have is: Is it possible to programatically
invalidate/expire/remove a control from the cache when a user performs a
certain action that I know would involve having to re-create the contents in
the user control?

I haven't been able to figure out a way to manually do this in code.

Some assistance/guidance/suggestions would be greatly appreciated.

Thanks!
ZD
 
Z D said:
The question I have is: Is it possible to programatically
invalidate/expire/remove a control from the cache when a user performs a
certain action that I know would involve having to re-create the
contents in the user control?

There is a aspnet.cacheing group you might try there.

If you are open to 3P solutions, you might also consider IntraWeb for
ASP.net. It can DEFINITELY do what you want.

www.atozed.com/intraweb/
 
Look at page.cache, cache the object that take awhile to create and you can
clear this cache down adhoc from other pages.

This means you dont need to use User Controls, just web controls will do.

I did some pref testing, usercontrols with output caching was 30% slower
than web controls with cache code where needed, eg caching a dataset.

Steve
 
Back
Top