MemoryCache.GetCount(String) 方法

定义

返回缓存中的缓存项总数。Returns the total number of cache entries in the cache.

public override long GetCount (string regionName = default);
override this.GetCount : string -> int64
Public Overrides Function GetCount (Optional regionName As String = Nothing) As Long

参数

regionName
String

缓存中的一个添加了缓存项的命名区域。A named region in the cache to which a cache entry was added. 不要为该参数传递值。Do not pass a value for this parameter. 默认情况下,此参数为null,因为 MemoryCache 类未实现区域。This parameter is null by default, because the MemoryCache class does not implement regions.

返回

Int64

缓存中的项数。The number of entries in the cache.

例外

regionName 不是 nullregionName is not null.

适用于