Himberjack
Himberjack

Reputation: 5792

Convert HttpContext current cache to LINQ

I am trying to find a specific key within the current Cache. Problem is, my key in the cache are composite, and I would like to run like a Linq Where expression.

Is this possible? if so - how? does it reduce performance on the server?

Thanks

Upvotes: 0

Views: 349

Answers (1)

Drew Marsh
Drew Marsh

Reputation: 33379

The whole idea behind a key is that it enables direct lookup of the item. If you have to scan all the items in the cache to find what you're looking for that's not going to perform very well at all. If you're using AppFabric Caching you can "tag" similar items with the same tag and then pull back all the items from the cache with that "tag" with a single call, but there is no such concept in the built in standard ASP.NET caching classes.

Upvotes: 2

Related Questions