What is the difference between application state and caching

Showing Answers 1 - 3 of 3 Answers

mangayar

  • Jun 29th, 2009
 

Application variables exist as long as the application is alive. Whereas the cache has the Property of timeout, which allows us to control the duration of the Objects so cached.
Another usefulness in caching is that we can define the way we cache our output, since caching can be done in 3 ways -
a) Full Page - defined in page directrive
b) Partial Page - Eg - .ascx control
c) Data / Programatic caching. using the Properties of Cache object such as Cache.Insert .

NOTE:
Caching variable is specifc to page and time out
Application variable is the global variable specific to application

  Was this answer useful?  Yes

kirangiet

  • Sep 10th, 2009
 

Application Object and Cached Object both falls under Server side State Management.

Application object resides in InProc i.e. on the same server where we hosted our application.
Cache Object resides on server side/ DownStream/Client Side.

Application Object will be disposed once application will stop.
Cache Object can be disposed using Time based cache dependency.

Only one user can access Application Object at a time hence we have to lock it every time we modify it.
 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions