Export (0) Print
Expand All

MemoryCache.Default Property

Gets a reference to the default MemoryCache instance.

Namespace:  System.Runtime.Caching
Assembly:  System.Runtime.Caching (in System.Runtime.Caching.dll)

public static MemoryCache Default { get; }

Property Value

Type: System.Runtime.Caching.MemoryCache
The default instance of the cache.

This property always returns a reference to the default cache instance. For typical application scenarios, only one instance of MemoryCache is required.

Because the default cache instance is not created by the constructor, you must use configuration to explicitly set the memory and polling values for the default cache instance. For more information, see <memoryCache> Element (Cache Settings).

.NET Framework

Supported in: 4.6, 4.5, 4
Show:
© 2015 Microsoft