Using the Cache Application Programming Interface

The Cache object exposes the main application programming interface for caching. This object supports the following properties:

Count Represents the number of items in the cache.

EffectivePrivateBytesLimit Represents the size of the cache in kilobytes.

The Cache object also supports the following methods:

Add Enables you to add a new item to the cache. If the item already exists, this method fails.

Get Enables you to return a particular item from the cache.

GetEnumerator Enables you to iterate through all the items in the cache.

Insert Enables you to insert a new item into the cache. If the item already exists, this method replaces it.

Remove Enables you to remove an item ...

Get ASP.NET 4 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.