What is an appropriate use case for all of the above? It seems session and cache are quite similar, and I can't think of much use for application.
14.9k 36 36 gold badges 150 150 silver badges 245 245 bronze badges asked Feb 23, 2011 at 20:15 32.1k 39 39 gold badges 124 124 silver badges 193 193 bronze badges You might want to add cookie, querystring, and viewstate Commented Feb 23, 2011 at 20:17 It is discussed here: velocityreviews.com/forums/t113590-caching-vs-session.html Commented Feb 23, 2011 at 20:20 Commented Jun 26, 2019 at 22:31Application and Session State have a very important difference:
Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than storing and retrieving information in a database. Unlike session state, which is specific to a single user session, application state applies to all users and sessions. Therefore, application state is a useful place to store small amounts of often-used data that does not change from one user to another
Caching, on the other hand, allows you to store objects in memory that require extensive server resources to create - it offers powerful features that allow you to customize how items are cached and how long they are cached - you can set extensive properties like priority and expiration.
Although they might appear similar, they are distinctly separate and have different roles to play in an ASP.NET application in its broadest sense.