0
alexanderpilhar created
10.1.0, Angular
Is it possible to invalidate a single item in ICacheManager? I know I can update a single item or invalidate the whole Cache - but I'm dealing with a quite complex item and can't guarantee the item will contain all information necessary for each and every case, and also I don't want to invalidate the whole Cache.
I tried setting the cached item to null but that is not allowed.
Is it possible to extend ICacheManager adding a method that invalidates a single item?
2 Answer(s)
-
1
Hi,
Yes, you can do it as shown below;
_cacheManager.GetCache("CacheName").Remove("ItemKey");
-
0
Oh, wow, I totally overlooked that ...
Thank you so much @ismcagdas!