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


Basic Cache Methods (Windows Server AppFabric Caching)

Windows Server AppFabric 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 (Windows Server AppFabric Caching).

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 (Windows Server AppFabric Caching).

See Also

Concepts

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