Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
ASP.NET: Clear all Cached objects
From Wiki
Summary: An example of how to clear all cached objects
The Cache doesn't have a Clear method so you have to loop through each item and Remove each key:
- Dim CacheEnum As IDictionaryEnumerator = Cache.GetEnumerator
- While CacheEnum.MoveNext
- Cache.Remove(CacheEnum.Key.ToString)
- End While
This Hack is part of the ASP.NET Hacks collection



LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.