In ASP.NET, we have the
IDictionaryEnumerator enumerator = Cache.GetEnumerator();
to get the elements of all cache objecs.
Do we have any method to get the cache objects that start with particular string. Something like
IDictionaryEnumerator enumerator = Cache.GetEnumerator("%key%");
instead of
while (enumerator.MoveNext())
{
if (enumerator.Key.ToString().ToLower().StartsWith("key"))
{
//code
}
}
You can try like this: