CacheItemPriority 枚举

定义

指定用于确定是否逐出某个缓存项的优先级别设置。

public enum class CacheItemPriority
public enum CacheItemPriority
type CacheItemPriority = 
Public Enum CacheItemPriority
继承
CacheItemPriority

字段

Default 0

指示移除缓存项没有优先级。

NotRemovable 1

指示绝不应从缓存中移除某个缓存项。

注解

可以设置的唯一优先级是条目是否应永久保留在缓存中。

重要

将优先级为 NotRemovable 的条目添加到缓存中,可能会溢出缓存,其中包含永远无法删除的条目。 仅当缓存实现提供从缓存中逐出此类条目和管理缓存条目数的方法时,才应为缓存项设置 NotRemovable 优先级。

适用于

另请参阅