DNN 基于文件的缓存提供程序如何决定使缓存对象失效?
DNN 博客状态 :
由于每个服务器的缓存都依赖于同一个文件,如果文件被修改,那么缓存就会失效,对象将从数据库中重新加载,并重新缓存。
我的问题是基于文件的缓存提供程序如何决定何时修改依赖文件,换句话说,DNN 如何决定对象已被修改并需要失效?
As each server's cache has a dependency on the same file, if the file is modified - then the cache is invalidated and the object will be reloaded from the database, and re-cached.
My question is how does file based caching provider decides when to modify the dependency file in other words how does DNN decide that an object has been modified and needs to be invalidated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FileSystemWatcher 类用于监视公共文件两个服务器都存在。当场中的任何服务器更新其自己的缓存(无论是在内存中还是在文件中)时,它都会更新相应的缓存依赖文件,场中每个其他服务器上的 FileSystemWatcher 都会捕获该文件,从而导致它们重新加载该缓存项。
A FileSystemWatcher class is used to monitor the common file that exists for both servers. When any server in the farm updates it's own cache (whether in memory, or in files), it updates the appropriate cache dependency file, which the FileSystemWatcher on each other server in the farm catches, which causes them to reload that cache item.