Export (0) Print
Expand All

MemoryCache Methods

The MemoryCache type exposes the following members.

  Name Description
Public method Add(CacheItem, CacheItemPolicy) Inserts a cache entry into the cache as a CacheItem instance, and adds details about how the entry should be evicted. (Overrides ObjectCache.Add(CacheItem, CacheItemPolicy).)
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. (Inherited from ObjectCache.)
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. (Inherited from ObjectCache.)
Public method AddOrGetExisting(CacheItem, CacheItemPolicy) Adds a cache entry into the cache using the specified CacheItem instance and details about how to evict the entry. (Overrides ObjectCache.AddOrGetExisting(CacheItem, CacheItemPolicy).)
Public method AddOrGetExisting(String, Object, DateTimeOffset, String) Adds a cache entry into the cache using the specified key and a value and an absolute expiration value. (Overrides ObjectCache.AddOrGetExisting(String, Object, DateTimeOffset, String).)
Public method AddOrGetExisting(String, Object, CacheItemPolicy, String) Inserts a cache entry into the cache using the specified key and value and the specified details for how it is to be evicted. (Overrides ObjectCache.AddOrGetExisting(String, Object, CacheItemPolicy, String).)
Public method Contains Determines whether a cache entry exists in the cache. (Overrides ObjectCache.Contains(String, String).)
Public method CreateCacheEntryChangeMonitor Creates a CacheEntryChangeMonitor object that can trigger events in response to changes to specified cache entries. (Overrides ObjectCache.CreateCacheEntryChangeMonitor(IEnumerable<String>, String).)
Public method Dispose Releases all resources that are used by the current instance of the MemoryCache class.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Get Returns an entry from the cache. (Overrides ObjectCache.Get(String, String).)
Public method GetCacheItem Returns the specified entry from the cache as a CacheItem instance. (Overrides ObjectCache.GetCacheItem(String, String).)
Public method GetCount Returns the total number of cache entries in the cache. (Overrides ObjectCache.GetCount(String).)
Protected method GetEnumerator Creates an enumerator that can be used to iterate through a collection of cache entries. (Overrides ObjectCache.GetEnumerator().)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValues(IEnumerable<String>, String) Returns a set of cache entries that correspond to the specified keys. (Overrides ObjectCache.GetValues(IEnumerable<String>, String).)
Public method GetValues(String, String[]) Gets a set of cache entries that correspond to the specified keys. (Inherited from ObjectCache.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove Removes a cache entry from the cache. (Overrides ObjectCache.Remove(String, String).)
Public method Set(CacheItem, CacheItemPolicy) Inserts a cache entry into the cache by using a CacheItem instance to supply the key and value for the cache entry. (Overrides ObjectCache.Set(CacheItem, CacheItemPolicy).)
Public method Set(String, Object, DateTimeOffset, String) Inserts a cache entry into the cache by using a key and a value and specifies time-based expiration details. (Overrides ObjectCache.Set(String, Object, DateTimeOffset, String).)
Public method Set(String, Object, CacheItemPolicy, String) Inserts a cache entry into the cache by using a key and a value and eviction. (Overrides ObjectCache.Set(String, Object, CacheItemPolicy, String).)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Trim Removes a specified percentage of cache entries from the cache object.
Top

  Name Description
Public Extension Method AsParallel Enables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension Method AsQueryable Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension Method Cast<TResult> Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension Method OfType<TResult> Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

  Name Description
Explicit interface implemetation Private method IEnumerable.GetEnumerator Provides support for iteration over a generic collection.
Explicit interface implemetation Private method IEnumerable<KeyValuePair<String, Object>>.GetEnumerator Supports iteration over a strongly typed collection. (Inherited from ObjectCache.)
Top
Show:
© 2014 Microsoft