CacheBehaviorAttribute 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
標記元件,使其不會被烘焙到包覆的快取視窗的快取輸出中,並指定該元件在此情況下的行為。 預設情況下,元件保持活躍狀態(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
- 屬性
建構函式
| 名稱 | Description |
|---|---|
| CacheBehaviorAttribute(CacheBehavior) |
初始化 CacheBehaviorAttribute 類別的新執行個體。 |
屬性
| 名稱 | Description |
|---|---|
| Behavior |
當元件無法被烘焙到包覆中的快取輸出時,該行為會套用。 |