语言

CacheConditionAttribute 类

定义

声明不同维度,当所有活动在封闭的 CacheView 上时,在缓存的输出中包括组件,而不是将其视为实时缓存组件(或在批注 CacheBehaviorAttribute 和 Throw时引发)。

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public sealed class CacheConditionAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type CacheConditionAttribute = class
    inherit Attribute
Public NotInheritable Class CacheConditionAttribute
Inherits Attribute
继承
CacheConditionAttribute
属性

构造函数

名称 说明
CacheConditionAttribute(CacheVaryBy)

初始化 CacheConditionAttribute 类的新实例。

属性

名称 说明
VaryBy

获取不同维度,当所有活动在封闭的 CacheView 上时,将组件包含在缓存的输出中。

适用于