MemoryCache.Default Property

.NET Framework (current version)

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
Available since 4.0
Return to top