DefaultCacheCapabilities 枚举

定义

表示缓存实现提供的一组功能。Represents a set of features that a cache implementation provides.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class DefaultCacheCapabilities
[System.Flags]
public enum DefaultCacheCapabilities
type DefaultCacheCapabilities = 
Public Enum DefaultCacheCapabilities
继承
DefaultCacheCapabilities
属性

字段

AbsoluteExpirations 8

利用缓存实现,可自动在特定的日期和时间移除缓存项。A cache implementation supports the ability to automatically remove cache entries at a specific date and time.

CacheEntryChangeMonitors 4

利用缓存实现,可创建用于监视项的更改监视器。A cache implementation supports the ability to create change monitors that monitor entries.

CacheEntryRemovedCallback 64

缓存实现可以发出通知,指示已从缓存中移除某个项。A cache implementation can raise a notification that an entry has been removed from the cache.

CacheEntryUpdateCallback 32

缓存实现可以发出通知,指示将要从缓存中移除某个项。A cache implementation can raise a notification that an entry is about to be removed from the cache. 此设置还指示,可以利用缓存实现自动将要移除的项替换为新的缓存项。This setting also indicates that a cache implementation supports the ability to automatically replace the entry that is being removed with a new cache entry.

CacheRegions 128

利用缓存实现,不但可以将其存储区划分为多个缓存区域,而且可以将缓存项插入到这些区域中,以及从这些区域中检索缓存项。A cache implementation supports the ability to partition its storage into cache regions, and supports the ability to insert cache entries into those regions and to retrieve cache entries from those regions.

InMemoryProvider 1

缓存实现中至少会有一部分在内存中运行。A cache implementation runs at least partially in memory. 分布式缓存不会设置此标志,而内存中的缓存(如 MemoryCache 类)会这样做。A distributed cache would not set this flag, whereas an in-memory cache such as the MemoryCache class would do so.

None 0

缓存实现不提供 DefaultCacheCapabilities 枚举中描述的任何功能。A cache implementation does not provide any of the features that are described in the DefaultCacheCapabilities enumeration.

OutOfProcessProvider 2

缓存实现在进程外运行。A cache implementation runs out-of-process. 分布式缓存会设置此标志,而内存中的缓存(如 MemoryCache 类)不会这样做。A distributed cache would set this flag, whereas an in-memory cache such as the MemoryCache class would not.

SlidingExpirations 16

利用缓存实现,可自动移除在指定时间跨度内未被访问的缓存项。A cache implementation supports the ability to automatically remove cache entries that have not been accessed in a specified time span.

注解

DefaultCacheCapabilities类是一个标志枚举。The DefaultCacheCapabilities class is a flag enumeration. 字段值为位, 可以组合为一组描述缓存功能的标志。The field values are bits and can be combined as a set of flags that describe the capabilities of the cache.

DefaultCacheCapabilities枚举可用于以编程方式设置缓存实现的行为。The DefaultCacheCapabilities enumeration can be used to programmatically set the behavior of the cache implementation. 此行为基于特定缓存实现的功能组合。This behavior is based on the combination of features that a particular cache implements.

适用于