Difference between Application and Cache objects?


Both the cache and application objects are global to entire applications.but the difference is the usage.
    cache will used for frequently changed items.application object is for the items which doesn't change frequently.
    Items in the cache will be removed automatically because it has the expiration time. but application object doesn't have the expiration date it will avail for entire life of the application.

Main Difference is while accessing the application data we need to explicitly Lock the variable and release the Lock once used,But in case of Cache this synchronization will be done implicitly.

No comments:

Post a Comment