Each caching technology / method has its own set of functions. These features may seem disadvantageous in one application, but may be useful in other application requirements.
So, in short, depending on your requirements, decide which caching technology and which features are best for you.
For example, Let us discuss some client side Caching techniques .
MSDN says that we can also use HiddenField to store only small amounts of frequently changing data in hidden fields, because that data is included in server callbacks for each postback.
Advantage of this feature: Reduces the workload on your server by storing page information using client options.
However, MSDN clearly says that: this approach has minimal security support.
Therefore, you can or cannot use this feature always, since there are security concerns.
Consider one more example , Page Output caching : these are 2 types, page output caching and page fragment caching.
Page output caching caches the entire web page and is suitable only when the contents of this page are quite static. If parts of the page change, you can wrap the static sections as user controls and cache user controls using cached page fragments.
And one last comment on Application vs HttpRuntime.cache :
Application not a cache, its global collection of value values. if you add an object to Application , it will remain until the approximation is restored.
- Application variables are common variables among all users of a web application.
- Application variables behave like static variables, and they replace static variables because static variables have no state in web applications.
- Only general values should be stored in application variables, and as soon as they are not used, they should be explicitly deleted.
Cache : You can achieve significant performance improvements in ASP.NET applications by caching frequently requested objects and data in the Application or Cache classes. Although the Cache class certainly provides much more flexibility and control, it seems to offer the ultimate advantage in terms of increased throughput over the Caching Application class. It would be very difficult to develop a testing scheme that could accurately measure the potential benefits of the Cache class of in-line management of less-used objects through the cleanup process, rather than the fact that the application does not offer this feature. The developer must make a decision in this case and must be based on the needs and convenience of the project and its patterns of use. Check out this link for more details.
See this MSDN article for a complete explanation of all caching technologies in Asp.net, with a discussion of the features of each technology.
In addition, these 2 links are a great source to start with: