How can we clear total cache of a give page?

 Posted by Chvrsri on 2/10/2012 | Category: ASP.NET Interview questions | Views: 2523 | Points: 40

At times we need to make sure that all the cache which was used must be cleared.

This can be done in many ways here is one of the way using the dictionary object

foreach(DictionaryEntry objClearItem in Cache)   

//Response.Write (objClearItem .Key.ToString ());
Cache.Remove(objClearItem .Key.ToString () ) ;

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response