MemoryCache.Default Property

.NET Framework 4.6 and 4.5

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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft