MemoryCache.GetCount Method (String)

.NET Framework (current version)
 

Returns the total number of cache entries in the cache.

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

public override long GetCount(
	string regionName = null
)

Parameters

regionName
Type: System.String

A named region in the cache to which a cache entry was added. Do not pass a value for this parameter. This parameter is null by default, because the MemoryCache class does not implement regions.

Return Value

Type: System.Int64

The number of entries in the cache.

Exception Condition
NotSupportedException

regionName is not null.

.NET Framework
Available since 4.0
Return to top
Show: