开发者

How can I get the item being removed when CacheItemUpdateCallback is called

开发者 https://www.devze.com 2022-12-24 00:12 出处:网络
I want to avoid an item being removed from cache when expire in SOME OCASIONS If i understand how CacheItemUpdateCallback works, i need to asign to expensiveObject the new object, in my case: the old

I want to avoid an item being removed from cache when expire in SOME OCASIONS

If i understand how CacheItemUpdateCallback works, i need to asign to expensiveObject the new object, in my case: the old one. But i cant access the item with HttpContext.Current.Cache[key],

my question: how to access the old item? or in other words, How prevent this item being removed in th开发者_高级运维e first place?


You can use the HttpRuntime to access the Cache.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号