So the solution is you need to use the IDictionaryEnumerator to get all of the cache key.
Lets look at the method example. Feel free to try by your self.
Clear Cache Method
public void clearCache() { IDictionaryEnumerator dictionaryEnumerators = Cache.GetEnumerator(); if (dictionaryEnumerators.MoveNext()) { Cache.Remove(dictionaryEnumerators.Key.ToString()); clearCache(); } }
By Mohd Zulkamal
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)
0 comments:
Post a Comment