Substitution control to bypass cache
When OutputCache is used to cache the page, the page response will be cached and the cached pages will be shown till the cache expires. This allows the web page to be rendered quickly. Wait there is a possibility that a frequently updated data is not shown to the client because of the cache. If this is what we want to accomplish, then substitution control can actually bypass the cache and display the frequently updated content to the client even thought he entire page is cached.
Display Data Using Substitution Control
To display some data using this control we need to have a static method accessible from mark-up. This function should accept a parameter with the type HttpContext, So that the control can fetch the data using this method.
How to verify the Substitution Control works?
If the sample doesn’t have a Cache directive, it is hard / impossible to notice how the control is actually bypassing the cache, so ...