Checking cache for key without loading the value #87
-
Is there a way to check if a value for some key has already been added to the cache without actually loading the data? Think of a (large) blob stored in cache where you are only interested in the fact if it's there but do not want to to actually load the large file/object. Using the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @seyfeb , and thanks for considering FusionCache! The underlying 2nd level works via the standard The downside is that the methods at FusionCache disposal are only the ones defined in the
As you can see there is not an available method to just check for the existence of an entry without getting the entry itself. If you have any idea on how to bypass this limit I'm open to suggestions! ps: I'm playing with the idea of adding support for custom distributed cache implementations different than |
Beta Was this translation helpful? Give feedback.
Hi @seyfeb , and thanks for considering FusionCache!
The underlying 2nd level works via the standard
IDistributedCache
interface: this allows FusionCache to automatically work with any of the available implementations of a distributed cache in .NET (see a list here).The downside is that the methods at FusionCache disposal are only the ones defined in the
IDistributedCache
interface (see here) which are:As you can see there is not an available method to just check for the existence of an entry without getting the entry itself.
If you have any idea on how to bypass this limit I'm open to suggestions!
ps: I'm playing with …