语言

CacheBehaviorAttribute 类

定义

标记一个组件,以便它不会被烘焙到封闭的 CacheView 的缓存输出中,并指定它的行为方式。 默认情况下,组件保持活动状态(Rerender):它在每次请求上运行自己的生命周期,同时捕获其参数一次,并在缓存命中保持不变地重播。 用于 Throw 引发而不是实时呈现。

结合在 CacheConditionAttribute 缓存的输出中包含组件时,边界因给定维度而异。

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

构造函数

名称 说明
CacheBehaviorAttribute(CacheBehavior)

初始化 CacheBehaviorAttribute 类的新实例。

属性

名称 说明
Behavior

获取当组件无法烘焙到封闭 CacheView 的缓存输出时要应用的行为。

适用于