开发者

How does DNN File Based Caching Provider decides to invalidate a cached object?

DN开发者_StackOverflow社区N Blog states:

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?


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜