October 2010
Intermediate to advanced
1920 pages
73h 55m
English
You can remove a page from the cache programmatically by using the Response.RemoveOutputCacheItem() method. For example, imagine that you are caching a page that displays a list of products. Furthermore, imagine that your website includes a separate page for adding a new product. In that case, you want to remove the first page programmatically from the cache when the list of products is updated.
The page in Listing 29.11 uses a GridView control to display a list of movies. The page is cached for 1 hour with an <%@ OutputCache %> directive.
Listing 29.11. MovieList.aspx

The page in Listing 29.12 ...
Read now
Unlock full access