What is the difference between Application and Cache in ASP.NET?

What is the difference between Application("some-object")and Cache("some-object")in ASP.NET?

+5
source share
4 answers

According to MS, the application store is only kept for backward compatibility with classic ASP applications, so use Cache because it is more intelligent and thread safe.

+4
source

An application is an application in the broadest sense, without a timeout (except when restarting the pool). Cache is a temporary repository for shared cache storage.

This and It can help clarify differences and customs.

Here is another one.

+9

, , cenario, , , , , ( ), - volatilemeans, , . relaibrel, , , .

+1
  • , -.
  • , , , .
  • With the most common use case, items can automatically “disappear” from the cache. This does not happen with the Application.
  • Cache seems to be best practice .
+1
source

All Articles