Поділитися через


Basic Cache Methods

Microsoft AppFabric 1.1 for Windows Server provides the DataCache object for you to work with the cache in your application code. The following table describes some of the DataCache methods that are used for basic cache operations. For more information about how to use some of these methods, see Using Basic Cache Methods.

Method Description

Add

Adds a new object to the cache. Add throws an exception if the item already is located in the cache.

Put

Adds a new object to the cache or replaces one if it already is located in the cache.

Get

Returns an object from the cache.

Remove

Removes an object from the cache.

CreateRegion

Creates a named region on the cache. Objects added to a region are guaranteed to be located physically on a single cache host.

ClearRegion

Clears the named region and removes all cached objects from it.

RemoveRegion

Deletes a named region. All cached objects inside the region are also removed together with the region itself.

ResetObjectTimeout

Resets the time-out value that determines when objects will be expired in the cache. For more information, see Expiration and Eviction (AppFabric 1.1 Caching).

See Also

Concepts

Class Overview
Tag-Based Methods
Concurrency Methods
Configuration Methods
Using Basic Cache Methods
AppFabric Caching Concepts (AppFabric 1.1 Caching)

  2012-09-12