What the difference between Application("some-object")
and Cache("some-object")
in ASP.NET?
views:
1093answers:
3Application is an application wide, no timeout (except when the pool restarts) dictionary. The cache is a temporary repository for common cache storage.
This And This might help clarify the differences and usages.
Here is another one.
According to MS, Application storage is only preserved for backward compatibility with classic ASP applications so use the Cache because it's smarter and thread-safe.
Application and cache are both application level storage of item, but difference is that in usage cenario , like cache is more flexible can do much more like scavenges ( removes unimortent item from cache automaticaly) ,but cache on othere side is volatilemeans that it is not sure that data will stay for application life .But Application is more relaibrel ,data stays when ever application is running but it is simple .