本地缓存失效 [英] Local Cache Invalidation

查看:116
本文介绍了本地缓存失效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过通知使本地缓存条目无效?


我读过:  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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆