SALES: 1-800-867-1380

DataCache Class

 

Updated: June 30, 2012

The object that is used by cache-enabled applications for storing and retrieving objects from the cache. An instance of this object is referred to as the cache client.

Namespace:   Microsoft.ApplicationServer.Caching
Assembly:  Microsoft.ApplicationServer.Caching.Client (in Microsoft.ApplicationServer.Caching.Client.dll)

System.Object
  Microsoft.ApplicationServer.Caching.DataCache

public sealed class DataCache

NameDescription
System_CAPS_pubmethodDataCache()

Creates a DataCache that accesses the "default" cache; uses settings in the "default" cache client configuration.

System_CAPS_pubmethodDataCache(String)

Creates a DataCache that accesses the specified cache name; uses settings in the "default" cache client configuration.

System_CAPS_pubmethodDataCache(String, String)

Creates a DataCache that accesses the specified cache name; uses settings in the named cache client configuration.

NameDescription
System_CAPS_pubpropertyItem[String]

Allows for the use of array notation to access cached objects.

System_CAPS_pubpropertyName

The name of the cache associated with the DataCache object.

NameDescription
System_CAPS_pubmethodAdd(String, Object)

Adds an object to the cache.

System_CAPS_pubmethodAdd(String, Object, IEnumerable<DataCacheTag>)

Adds an object to the cache. This method enables associating tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAdd(String, Object, IEnumerable<DataCacheTag>, String)

Adds an object to a region in the cache. This method enables association of tags with objects in the cache. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAdd(String, Object, String)

Adds an object to a region in the cache. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAdd(String, Object, TimeSpan)

Adds an object to the cache. This method provides the ability to specify when the object should be expired.

System_CAPS_pubmethodAdd(String, Object, TimeSpan, IEnumerable<DataCacheTag>)

Adds an object to the cache. This method enables associating tags with the cached object and specifying when the object should be expired. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAdd(String, Object, TimeSpan, IEnumerable<DataCacheTag>, String)

Adds an object to a region in the cache. This method enables associating tags with the cached object and specifying when the object should be expired. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAdd(String, Object, TimeSpan, String)

Adds an object to a region in the cache. This method provides the ability to specify when the object should be expired. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAddCacheLevelBulkCallback(DataCacheBulkNotificationCallback)

Adds a bulk cache notification callback for cache operations occurring on all regions and items. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAddCacheLevelCallback(DataCacheOperations, DataCacheNotificationCallback)

Adds a cache notification callback for cache operations occurring on all regions and items. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAddFailureNotificationCallback(DataCacheFailureNotificationCallback)

Adds a failure notification callback, for notifications indicating that a client has missed one or more cache notifications. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAddItemLevelCallback(String, DataCacheOperations, DataCacheNotificationCallback)

Adds a cache notification callback for cache operations occurring on one specific item that is not stored in a region. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAddItemLevelCallback(String, DataCacheOperations, DataCacheNotificationCallback, String)

Adds a cache notification callback for cache operations occurring on one specific item that is stored in region. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAddRegionLevelCallback(String, DataCacheOperations, DataCacheNotificationCallback)

Adds a cache notification callback for cache operations occurring on one specific region. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodAppend(String, String)

Concatenates a string to a string object stored in the cache.

System_CAPS_pubmethodAppend(String, String, String)

Concatenates a string to a string object stored in the cache in the specified region.

System_CAPS_pubmethodBulkGet(IEnumerable<String>)

Gets all of the objects associated with the specified keys across all system regions. This method does not search user-defined regions.

System_CAPS_pubmethodBulkGet(IEnumerable<String>, String)

Returns objects for the specified keys from the specified region of the cache. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodClear()

Removes all objects from the cache associated with the DataCache object.

System_CAPS_pubmethodClearRegion(String)

Deletes all objects in the specified region. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodCreateRegion(String)

Creates a region. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodDecrement(String, Int64, Int64)

Decrements a long value stored in the cache.

System_CAPS_pubmethodDecrement(String, Int64, Int64, String)

Decrements a long value stored in the cache in the specified region.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGet(String)

Gets an object from the cache using the specified key.

System_CAPS_pubmethodGet(String, DataCacheItemVersion)

Gets an object from the cache using the specified key. You may also provide the version to obtain a specific version of a key, if that version is still the most current in the cache.

System_CAPS_pubmethodGet(String, DataCacheItemVersion, String)

Gets an object from the specified region by using the specified key. You may also provide the version to obtain the specific version of a key, if that version is still the most current in the region. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGet(String, String)

Gets an object from the specified region by using the specified key. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetAndLock(String, TimeSpan, DataCacheLockHandle)

Locks the key if the key is present and it is not locked and returns the object corresponding to the key.

System_CAPS_pubmethodGetAndLock(String, TimeSpan, DataCacheLockHandle, Boolean)

Lock the key if key is present and it is not locked by any clients and returns the object corresponding to the key.

System_CAPS_pubmethodGetAndLock(String, TimeSpan, DataCacheLockHandle, String)

Locks the key if the key is present and is not locked and returns the object corresponding to the key. For objects stored in regions. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetAndLock(String, TimeSpan, DataCacheLockHandle, String, Boolean)

Lock the key if key is present and it is not locked by any clients and returns the object corresponding to the key. For objects stored in regions. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetCacheItem(String)

Gets a DataCacheItem object to retrieve all information associated with your cached object in the cluster.

System_CAPS_pubmethodGetCacheItem(String, String)

Gets a DataCacheItem object to retrieve all information associated with your cached object in the cluster. For objects stored in regions. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetIfNewer(String, DataCacheItemVersion)

Gets an object from the cache, but only if a newer version of the object resides in the cache.

System_CAPS_pubmethodGetIfNewer(String, DataCacheItemVersion, String)

Gets an object from the specified region, but only if a newer version of the object resides in the region. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetObjectsByAllTags(IEnumerable<DataCacheTag>, String)

Gets an enumerable list of all cached objects in the specified region that have all the same tags in common. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetObjectsByAnyTag(IEnumerable<DataCacheTag>, String)

Gets an enumerable list of all cached objects in the specified region that have any of the same tags in common. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetObjectsByTag(DataCacheTag, String)

Gets an enumerable list of all cached objects in the specified region that have the specified tag. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetObjectsInRegion(String)

Gets an enumerable list of all cached objects in the specified region. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetSystemRegionName(String)

Returns the system region name for the specified key. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetSystemRegions()

Used to determine the default regions for the cache. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIncrement(String, Int64, Int64)

Increments a long value stored in the cache.

System_CAPS_pubmethodIncrement(String, Int64, Int64, String)

Increments a long value stored in the cache in the specified region.

System_CAPS_pubmethodPrepend(String, String)

Prepends a string to a string object stored in the cache.

System_CAPS_pubmethodPrepend(String, String, String)

Prepends a string to a string object stored in the cache in the specified region.

System_CAPS_pubmethodPut(String, Object)

Adds or replaces an object in the cache.

System_CAPS_pubmethodPut(String, Object, DataCacheItemVersion)

Adds or replaces an object in the cache if it is at the specified version.

System_CAPS_pubmethodPut(String, Object, DataCacheItemVersion, IEnumerable<DataCacheTag>)

Adds or replaces an object in the cache if it is at the specified version. Associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, DataCacheItemVersion, IEnumerable<DataCacheTag>, String)

Adds or replaces an object in the specified region if it is at the specified version. Associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, DataCacheItemVersion, String)

Adds or replaces an object in the specified region if it is at the specified version. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, DataCacheItemVersion, TimeSpan)

Adds or replaces an object in the cache if it is at the specified version. Specifies the timeout value of the cached object.

System_CAPS_pubmethodPut(String, Object, DataCacheItemVersion, TimeSpan, IEnumerable<DataCacheTag>)

Adds or replaces an object in the cache if it is at the specified version. Specifies the timeout value and associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, DataCacheItemVersion, TimeSpan, IEnumerable<DataCacheTag>, String)

Adds or replaces an object in the specified region if it is at the specified version. Specifies the timeout value and associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, DataCacheItemVersion, TimeSpan, String)

Adds or replaces an object in the specified region if it is at the specified version. Specifies the timeout value of the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, IEnumerable<DataCacheTag>)

Adds or replaces an object in the cache. Associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, IEnumerable<DataCacheTag>, String)

Adds or replaces an object in the specified region. Associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, String)

Adds or replaces an object in the specified region. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, TimeSpan)

Adds or replaces an object in the cache. Specifies the timeout value of the cached object.

System_CAPS_pubmethodPut(String, Object, TimeSpan, IEnumerable<DataCacheTag>)

Adds or replaces an object in the cache. Specifies the timeout value and associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, TimeSpan, IEnumerable<DataCacheTag>, String)

Adds or replaces an object in the specified region. Specifies the timeout value and associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPut(String, Object, TimeSpan, String)

Adds or replaces an object in the specified region. Specifies the timeout value of the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPutAndUnlock(String, Object, DataCacheLockHandle)

Replaces and unlocks an object in the cache.

System_CAPS_pubmethodPutAndUnlock(String, Object, DataCacheLockHandle, IEnumerable<DataCacheTag>)

Replaces and unlocks an object in the cache. Associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPutAndUnlock(String, Object, DataCacheLockHandle, IEnumerable<DataCacheTag>, String)

Replaces and unlocks an object in the specified region. Associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPutAndUnlock(String, Object, DataCacheLockHandle, String)

Replaces and unlocks an object in the specified region. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPutAndUnlock(String, Object, DataCacheLockHandle, TimeSpan)

Replaces and unlocks an object in the cache. Specifies the timeout value of the cached object.

System_CAPS_pubmethodPutAndUnlock(String, Object, DataCacheLockHandle, TimeSpan, IEnumerable<DataCacheTag>)

Replaces and unlocks an object in the cache. Specifies the timeout value and associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPutAndUnlock(String, Object, DataCacheLockHandle, TimeSpan, IEnumerable<DataCacheTag>, String)

Replaces and unlocks an object in the specified region. Specifies the timeout value and associates tags with the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodPutAndUnlock(String, Object, DataCacheLockHandle, TimeSpan, String)

Replaces and unlocks an object in the specified region. Specifies the timeout value of the cached object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodRemove(String)

Removes an object from the cache.

System_CAPS_pubmethodRemove(String, DataCacheItemVersion)

Removes an object with a specific version from the cache.

System_CAPS_pubmethodRemove(String, DataCacheItemVersion, String)

Removes an object with a specific version from the cache in a region. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodRemove(String, DataCacheLockHandle)

Removes an object from the cache with an associated lock handle.

System_CAPS_pubmethodRemove(String, DataCacheLockHandle, String)

Removes an object from the cache with an associated lock handle in a region. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodRemove(String, String)

Removes an object from the cache in a region. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodRemoveCallback(DataCacheNotificationDescriptor)

Removes a cache notification callback. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodRemoveRegion(String)

Deletes a region. All cached objects inside the region are also removed. Not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodResetObjectTimeout(String, TimeSpan)

Resets the object timeout value, defining how long objects reside in the cache before expiring. The value specified for the object overrides the default settings for the cache.

System_CAPS_pubmethodResetObjectTimeout(String, TimeSpan, String)

Resets the object timeout value, defining how long objects reside in the region before expiring. The value specified for the object overrides the default settings for the cache.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUnlock(String, DataCacheLockHandle)

Releases objects locked in the cache. This method supports pessimistic concurrency by making sure that the appropriate DataCacheLockHandle is used for unlocking the object.

System_CAPS_pubmethodUnlock(String, DataCacheLockHandle, String)

Releases objects locked in the specified region. This method supports pessimistic concurrency by making sure that the appropriate DataCacheLockHandle is used for unlocking the object. This overload is not supported in Windows Azure Shared Caching.

System_CAPS_pubmethodUnlock(String, DataCacheLockHandle, TimeSpan)

Releases objects locked in the cache. This method supports pessimistic concurrency by making sure that the appropriate DataCacheLockHandle is used for unlocking the object. Specifies a new timeout value for the cached object.

System_CAPS_pubmethodUnlock(String, DataCacheLockHandle, TimeSpan, String)

Releases objects locked in the specified region. This method supports pessimistic concurrency by making sure that the appropriate DataCacheLockHandle is used for unlocking the object. Specifies a new timeout value for the cached object. This overload is not supported in Windows Azure Shared Caching.

NameDescription
System_CAPS_pubeventCacheOperationCompleted

This API supports the product infrastructure and is not intended to be used directly from your code. Internal.

System_CAPS_pubeventCacheOperationStarted

This API supports the product infrastructure and is not intended to be used directly from your code. Internal.

There are multiple options for cache clients, which are specified in the application configuration settings.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft