Is there some sort of CacheDependency in System.Runtime.Caching?

一个人想着一个人 提交于 2019-11-30 03:23:40

问题


I heard that .NET 4 has a new caching API.

Okay, so the good old System.Web.Caching.Cache (which is, by the way, still there in .NET 4) has the ability to set so-called CacheDependency objects to determine whether a cached item is expired or not.

One can also specify custom logic for determining whether a cached item is still useable or not by deriving a custom subclass from CacheDependency.

I'm curious, is there a way to provide such a logic in the new API?


回答1:


I haven't really used it yet but classes derived from ChangeMonitor Class appear to serve a similar purpose.



来源:https://stackoverflow.com/questions/2889812/is-there-some-sort-of-cachedependency-in-system-runtime-caching

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!