Class CacheControlHeader
Representation of the Cache-Control
header field.
<?php use ICanBoogie\HTTP\CacheControlHeader; $cc = CacheControl::from('public, max-age=3600'); echo $cc->cacheable; // true echo $cc->max_age; // 3600 $cc->cacheable = 'no-cache'; $cc->max_age = null; $cc->no_store = true; $cc->must_revalidate = true; echo $cc; // no-cache, no-store, must-revalidate
See: http://tools.ietf.org/html/rfc2616#section-14.9
Located at vendor/icanboogie/http/lib/headers/cache-control.php
Methods summary
protected static
array
|
|
public static
|
|
public
|
#
__construct( string $cache_directives = null )
If they are defined, the object is initialized with the cache directives. |
public
|
|
public
|
|
public
string
|
|
public
|
Magic methods summary
Properties summary
protected static
array
|
$cacheable_values | |
protected static
array
|
$booleans | |
protected static
array
|
$placeholder | |
public
boolean
|
$no_store |
#
Wheter the request/response is can be stored. |
public
integer
|
$max_age |
#
Indicates that the client is willing to accept a response whose age is no
greater than the specified time in seconds. Unless |
public
integer
|
$s_maxage | |
public
string
|
$max_stale |
#
Indicates that the client is willing to accept a response that has exceeded its expiration time. If max-stale is assigned a value, then the client is willing to accept a response that has exceeded its expiration time by no more than the specified number of seconds. If no value is assigned to max-stale, then the client is willing to accept a stale response of any age. |
public
integer
|
$min_fresh |
#
Indicates that the client is willing to accept a response whose freshness lifetime is no less than its current age plus the specified time in seconds. That is, the client wants a response that will still be fresh for at least the specified number of seconds. |
public
boolean
|
$no_transform | |
public
boolean
|
$only_if_cached |
#
Scope: request. |
public
boolean
|
$must_revalidate |
#
Scope: response. |
public
boolean
|
$proxy_revalidate |
#
Scope: response. |
public
string
|
$extensions |
#
Scope: request, response. |