I have implemented a diskbased cache and would also like to enable it to outputcache usercontrols as well. I have read that I cannot use the diskbased outputcache provider for usercontrols but only to outputcache entire pages.
Is it possible to outputcache the usercontrol to disk in some other way or to some other storagetype (db) ?
thanks
Thomas
ASP.Net 4.0 added output cache extensibility. You do this by creating an output cache provider. In the words of Scott Gu,
You create an output cache provider by subclassing the
OutputCacheProvider base class.
Once you have created the cache provider, you can register it in your web.config file:
When you put an OutputCache directive on your user control’s ascx page:
you should be able to use this custom cache provider for your user control.
For more information, see Scott Gu’s excellent blog post.