Language

CacheBehavior Enum

Definition

Specifies how a component behaves when it is used inside an enclosing CacheView and cannot be baked into the cached output.

public enum CacheBehavior
type CacheBehavior = 
Public Enum CacheBehavior
Inheritance
CacheBehavior

Fields

Name Value Description
Rerender 0

The component stays live inside the cache: it runs its own lifecycle on every request, while its parameters are captured once and replayed unchanged on cache hits. This is the default behavior.

Throw 1

Using the component inside a CacheView throws an InvalidOperationException. Use this for components whose parameters would not behave correctly if captured once and replayed.

Applies to