Is there a Cache.RemoveAll()? How can I clear / remove the total cache

Platform: ASP.NET| Category: Output Caching

VB.NET


Dim objItem As DictionaryEntry
For Each objItem In  Cache
   ’Response.Write (objItem.Key.ToString ());
   Cache.Remove(objItem.Key.ToString())
Next  

C#


foreach(DictionaryEntry objItem in Cache) 
{ 
	//Response.Write (objItem.Key.ToString ());
	Cache.Remove(objItem.Key.ToString () ) ;
}

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.