Table of Contents

Class CacheVaryByAttribute

Namespace
Kentico.PageBuilder.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Specifies cache vary by configuration of a widget.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class CacheVaryByAttribute : Attribute
Inheritance
object
Attribute
CacheVaryByAttribute
Extension Methods

Constructors

CacheVaryByAttribute(params Type[])

Allows to define vary by options of the widget.

public CacheVaryByAttribute(params Type[] varyByOptionTypes)

Parameters

varyByOptionTypes Type[]

Types of classes implementing ICacheVaryByOption.

Remarks

Page A/B test and widget's personalization settings are automatically included in the result vary by configuration.

See Also

Properties

VaryByCookie

Comma-delimited set of cookie names to vary the cached result by.

public string VaryByCookie { get; set; }

Property Value

string

VaryByCookieLevel

Indicates if cached result is to be varied by cookie level.

public bool VaryByCookieLevel { get; set; }

Property Value

bool

VaryByCulture

Indicates if cached result is to be varied by request culture. Default value is true.

public bool VaryByCulture { get; set; }

Property Value

bool

VaryByHeader

Comma-delimited set of HTTP request headers to vary the cached result by.

public string VaryByHeader { get; set; }

Property Value

string

VaryByHost

Indicates if cached result is to be varied by host name.

public bool VaryByHost { get; set; }

Property Value

bool

VaryByOptionTypes

Types of classes implementing ICacheVaryByOption which can be used to return string value to vary the cached result by.

public Type[] VaryByOptionTypes { get; }

Property Value

Type[]

VaryByQuery

Comma-delimited set of query parameters to vary the cached result by.

public string VaryByQuery { get; set; }

Property Value

string

VaryByRoute

Comma-delimited set of route data parameters to vary the cached result by.

public string VaryByRoute { get; set; }

Property Value

string

VaryByUser

Indicates if cached result is to be varied by the identity for the logged in user.

public bool VaryByUser { get; set; }

Property Value

bool

See Also