Does ASP.NET support the notion of multiple caches with the built-in caching? My end goal is to be able to pull out all items of a certain type from the cache. This could be done with a separate cache per type, or through some sort of naming convention. Ideally, I’d be able to use LINQ in the following manner:
var items = (from item in cache.Items where item.Key.StartsWith(“person”) select item);
Or perhaps I could define a separate “person” cache. Is this possible with the built-in system or will I need to use a third party alternative?
Thanks
In fact,
Cacheclass already implementsIEnumerable, so you canforeachover it (and query it with LINQ, for that matter). Documentation does not state what is the type of an object this enumerator yields, but this can be found out in debugger once and forever.