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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.