本地缓存失效 [英] Local Cache Invalidation
问题描述
如何通过通知使本地缓存条目无效?
我读过: http://msdn.microsoft.com/en-us/library/ee790841.aspx
这说明了如何添加回调基于通知。
您是否需要为回调方法上的给定缓存项调用GetIfNewer,或者您应该以短的间隔调用ResetObjectTimeout以使本地缓存中的项过期。
谢谢
在创建DataCacheFactory实例时,更改配置以将InvalidationPolicy设置为NotificationsBased in DataCacheLocalCacheProperties:
http://msdn.microsoft。 com / en-us / library / microsoft.applicationserver.caching.datacachelocalcacheproperties_members.aspx
Re GARDS
How does one invalidate local cache entries through notifications?
I've read: http://msdn.microsoft.com/en-us/library/ee790841.aspx
Which tells about adding a callback based on notifications.
Do you need to call GetIfNewer for a given cache item on the callback method or should you call ResetObjectTimeout with a short interval to expire the item in local cache.
Thanks
While creating DataCacheFactory instance, change the configuration to set InvalidationPolicy to NotificationsBased in DataCacheLocalCacheProperties : http://msdn.microsoft.com/en-us/library/microsoft.applicationserver.caching.datacachelocalcacheproperties_members.aspx
Regards
这篇关于本地缓存失效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!