VarnishManagement
in package

This is the varnish management management class.

The headers needed to manage Varnish cache will be setted and sent on that class.

Tags
see
VarnishManagement::addXKey()
see
VarnishManagement::setHeader()
see
VarnishManagement::send()

Table of Contents

addXkey() Adds a xkey header with the given value.  : void
addXkeys() Adds a set of xkey headers with the given space-delimited values.  : void
getXttl() Return ttl response.  : int
isAddedTtl() Return if is added ttl to response.  : bool
send() Send the setted headers on this class to manage Varnish cache.  : void
setHeader() Sets a new varnish header with the given key and value.  : void
setXttl() Set ttl header value.  : void

Methods

addXkey()

Adds a xkey header with the given value.

public static addXkey(string $value) : void
Parameters
$value : string
Return values
void

addXkeys()

Adds a set of xkey headers with the given space-delimited values.

public static addXkeys(string $values) : void
Parameters
$values : string
Return values
void

getXttl()

Return ttl response.

public static getXttl() : int
Return values
int

isAddedTtl()

Return if is added ttl to response.

public static isAddedTtl() : bool
Return values
bool

send()

Send the setted headers on this class to manage Varnish cache.

public static send([array<string|int, mixed> $responseHeaders = [] ][, bool $cacheable = true ]) : void
Parameters
$responseHeaders : array<string|int, mixed> = []
$cacheable : bool = true
Return values
void

setHeader()

Sets a new varnish header with the given key and value.

public static setHeader(string $key, string $value) : void
Parameters
$key : string
$value : string
Return values
void

setXttl()

Set ttl header value.

public static setXttl(string $value, string $origin) : void

Checks if the param value is lower than current value to set it.

Parameters
$value : string
$origin : string
Return values
void

Search results