Table of Contents

Class VaryByHost

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

Represents a vary by option for widget output cache which is based on current request's host name.

public class VaryByHost : ICacheVaryByOption
Inheritance
object
VaryByHost
Implements
Extension Methods

Constructors

VaryByHost(IHttpContextAccessor)

Initializes a new instance of the VaryByHost class.

public VaryByHost(IHttpContextAccessor httpContextAccessor)

Parameters

httpContextAccessor IHttpContextAccessor

Provider of current HTTP context.

Methods

GetKey()

Gets key characterizing host name which applies to the current request.

public string GetKey()

Returns

string

Returns key identifying the cache variant.