Introduction to .NET Framework 3.0/Caching

From Wikibooks, open books for an open world
Jump to navigation Jump to search

There are three types of caching supported by .NET 3.0

  • Absolute Expiration Caching
  • Sliding Caching
  • Cache Dependency Expiration caching

Absolute Expiration Caching[edit | edit source]

This is a form of caching wherein the expiration time is specified in advance. After a specific period of time, the contents of the cache get deleted.

Sliding Caching[edit | edit source]

Here, a time span is specified up to which the program checks for access. If no individual has accessed the site till the time span has expired, then the contents of the cache get deleted. So here, the time-span of the cache depends upon the popularity of the site.

Cache Dependency Expiration[edit | edit source]

In cache dependency expiration, the timespan of the cache depends on when the particular item on which the data is dependent is changed.