Jaa


ObjectCache Members

Include Protected Members
Include Inherited Members

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

The ObjectCache type exposes the following members.

Constructors

  Name Description
Protected method ObjectCache
Initializes a new instance of the ObjectCache class

Methods

  Name Description
Public method Add(CacheItem, CacheItemPolicy)
When overridden in a derived class, tries to insert a cache entry into the cache as a CacheItem instance, and adds details about how the entry should be evicted.
Public method Add(String, Object, CacheItemPolicy, String)
When overridden in a derived class, inserts a cache entry into the cache, specifying information about how the entry will be evicted.
Public method Add(String, Object, DateTimeOffset, String)
When overridden in a derived class, inserts a cache entry into the cache without overwriting any existing cache entry.
Public method AddOrGetExisting(CacheItem, CacheItemPolicy)
When overridden in a derived class, inserts the specified CacheItem object into the cache, specifying information about how the entry will be evicted.
Public method AddOrGetExisting(String, Object, CacheItemPolicy, String)
When overridden in a derived class, inserts a cache entry into the cache, specifying a key and a value for the cache entry, and information about how the entry will be evicted.
Public method AddOrGetExisting(String, Object, DateTimeOffset, String)
When overridden in a derived class, inserts a cache entry into the cache, by using a key, an object for the cache entry, an absolute expiration value, and an optional region to add the cache into.
Public method Contains
When overridden in a derived class, checks whether the cache entry already exists in the cache.
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public method Get
When overridden in a derived class, gets the specified cache entry from the cache as an object.
Public method GetCacheItem
When overridden in a derived class, gets the specified cache entry from the cache as a CacheItem instance.
Public method GetCount
When overridden in a derived class, gets the total number of cache entries in the cache.
Protected method GetEnumerator
When overridden in a derived class, creates an enumerator that can be used to iterate through a collection of cache entries.
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method GetValues(IEnumerable<String>, String)
When overridden in a derived class, gets a set of cache entries that correspond to the specified keys.
Public method GetValues(String, array<String>)
Gets a set of cache entries that correspond to the specified keys.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Remove
When overridden in a derived class, removes the cache entry from the cache.
Public method Set(CacheItem, CacheItemPolicy)
When overridden in a derived class, inserts the cache entry into the cache as a CacheItem instance, specifying information about how the entry will be evicted.
Public method Set(String, Object, CacheItemPolicy, String)
When overridden in a derived class, inserts a cache entry into the cache.
Public method Set(String, Object, DateTimeOffset, String)
When overridden in a derived class, inserts a cache entry into the cache, specifying time-based expiration details.
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)

Extension Methods

  Name Description
Public Extension Method ForEach<KeyValuePair<String, Object>>(Action<KeyValuePair<String, Object>>) Overloaded.
Execute action for each element of sequence.
(Defined by EnumerableExtensions.)
Public Extension Method ForEach<KeyValuePair<String, Object>>(Action<KeyValuePair<String, Object>>) Overloaded. (Defined by EnumerableExtensions.)
Public Extension Method JoinStrings<KeyValuePair<String, Object>>(String) Overloaded. (Defined by EnumerableExtensions.)
Public Extension Method JoinStrings<KeyValuePair<String, Object>>(String, Func<KeyValuePair<String, Object>, String>) Overloaded. (Defined by EnumerableExtensions.)
Public Extension Method ToDictionary<KeyValuePair<String, Object>, TValue>
Take two sequences and return a IDictionary<TKey, TValue> with the first sequence holding the keys and the corresponding elements of the second sequence containing the values.
(Defined by EnumerableExtensions.)
Public Extension Method Zip<KeyValuePair<String, Object>, T2>(IEnumerable<T2>) Overloaded.
Take two sequences and return a new sequence of KeyValuePair<TKey, TValue> objects.
(Defined by EnumerableExtensions.)
Public Extension Method Zip<KeyValuePair<String, Object>, T2, TResult>(IEnumerable<T2>, Func<KeyValuePair<String, Object>, T2, TResult>) Overloaded.
Given a sequence, combine it with another sequence, passing the corresponding elements of each sequence to the zipper action to create a new single value from the two sequence elements. "Zip" here refers to a zipper, not the compression algorithm. The resulting sequence will have the same number of elements as the shorter of sequence1 and sequence2.
(Defined by EnumerableExtensions.)

Fields

  Name Description
Public fieldStatic member InfiniteAbsoluteExpiration
Gets a value that indicates that a cache entry has no absolute expiration.
Public fieldStatic member NoSlidingExpiration
Indicates that a cache entry has no sliding expiration time.

Properties

  Name Description
Public property DefaultCacheCapabilities
When overridden in a derived class, gets a description of the features that a cache implementation provides.
Public property Item
Gets or sets the default indexer for the ObjectCache class.
Public property Name
Gets the name of the ObjectCache instance.

See Also

ObjectCache Class

Microsoft.Practices.EnterpriseLibrary.Caching.Runtime.Caching Namespace