开发者

Massive use of ASP.NET file-dependency: Downsides?

开发者 https://www.devze.com 2023-03-18 19:55 出处:网络
I have hundreds or thousand of objects each dependent on the state of several files and/or folders. I thought using the built in Cache in combination with CacheDependencies and AggregateCacheDependenc

I have hundreds or thousand of objects each dependent on the state of several files and/or folders. I thought using the built in Cache in combination with CacheDependencies and AggregateCacheDependencies would be be the way to go.

Unfortunately, I cannot find any documentation on how exactly file-dependenc开发者_开发知识库ies work internally. This is why I was wondering if there could be any pitfall using this much dependencies (e.g. if the cache polls for changes the whole system slows down as this is done too excessively, ..).

Long story short: I would appreciate some resources or cliff-notes on how file-dependencies work. I am also interested in limitations and bottlenecks.


The file change notification mechanism keeps track of file dependencies. It's an operating system function that various ASP.NET modules, including the HTTP runtime, use extensively. When a file dependency is created, the ASP.NET Cache starts to monitor that file or directory. Thanks to the capabilities of the OS, any change on a monitored resource results in an event raised to the Cache object. The handler of this internal event takes care of the removal of the linked item.

see http://msdn.microsoft.com/en-us/magazine/cc163955.aspx

0

精彩评论

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