Friday, June 8, 2012

What is caching

It is the technique of storing an in memory copy of some information that is frequently used items in server memory and expensive to create (Interms of performance).

Types of caching
Page output caching.-- setting at the page level
Data Caching.-- Caching the simple variable as we place in session
Fragment Caching. -- It means caching a portion of page(Usually a user controls data).
Data Source Caching.-- Some data source like sql data source can support caching.

Cache objects have 2 types of expirations.

Absolute expiration.
Sliding expiration.

Absolute Expiration: A date time object that identifies when the data should be removed fro the cache.
If you want to use sliding expiration then specify cach.NoAbsoluteexpiration.

Sliding Expiration. A time span object how much the data should be in cache.


Scevaning : It is process of removal of cache items from the cache if server memory is very low . Here it will remove the items based on the priority.

Cache dependency
1. Dependencies on other cache items
2.Dependencies on files and folders.
3.Dependencies on db query.



"OnRemoveCallBack" delegate in the application is used to notify when items are removed from the cache.

No comments:

Post a Comment