.NET 2.0 feature: Post-Cache Substitution

Saturday, January 22, 2005 9:53 AM

At times I get a little annoyed with all the talk about Longhorn and .NET 2.0 with both are still in beta, but at any rate…

Via Nikhil Kothari: He talks about a little known cache enhancement in .NET 2.0.

This feature nicely rounds out the caching support offered by the framework. Previously you could output cache whole pages, or fragments of a page. However, you could not implement a dynamic region within a cached page. The best way to think of this scenario is the AdRotator control, which does make use of this new infrastructure. The entire page might be output cached, but a different ad still needs to be displayed on each request to the page. Post-cache substitution enables this with very little logic on your end. Rather than build the functionality into AdRotator, we provided it as a generic service. As an example, using this service, I could output cache my site’s home page, and continue to change the random photo shown in the sidebar on each request.

» Post-Cache Substitution

comments powered by Disqus