Home > ASP.Net > Difference between Application caching and session objects

Difference between Application caching and session objects

Session
A session is the time for which a particular user interacts with a web   application.  During a session the unique identity of the user is maintained  internally. A  session ends if there is a session timeout or user ends sessionby logging out.Sessions may change from user to user.

Cache
Caching can be used to temporarily store page output or application data either on the client or on the server,  which can then be re-used to satisfy subsequent requests and thus avoid the overhead of re-creating the same  information.Caching is particularly suitable when you expect to  Cache will be applicable to the entire application through out it’s life cycle return the same information in the same format for many different requests.

Application
Its nothing but similar to Session with a bit difference that is Session objects have scope within a particular session while application  objects having scope within entire application.  Application are accessible only from code running within the context of the originating application. Other applications running on the system cannot access or modify the values.

Categories: ASP.Net
  1. No comments yet.
  1. No trackbacks yet.