HttpCache
class HttpCache implements HttpKernelInterface, TerminableInterface
Cache provides HTTP caching.
Methods
Constructor.
Gets the current store.
Returns an array of events that took place during processing of the last request.
Returns a log message for the events of the last request processing.
Gets the Request instance associated with the master request.
Gets the Kernel instance.
Gets the Surrogate instance.
Details
at line line 78
__construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = array())
Constructor.
The available options are:
debug: If true, the traces are added as a HTTP header to ease debugging
default_ttl The number of seconds that a cache entry should be considered fresh when no explicit freshness information is provided in a response. Explicit Cache-Control or Expires headers override this value. (default: 0)
private_headers Set of request headers that trigger "private" cache-control behavior on responses that don't explicitly state whether the response is public or private via a Cache-Control directive. (default: Authorization and Cookie)
allow_reload Specifies whether the client can force a cache reload by including a Cache-Control "no-cache" directive in the request. Set it to
true
for compliance with RFC 2616. (default: false)allow_revalidate Specifies whether the client can force a cache revalidate by including a Cache-Control "max-age=0" directive in the request. Set it to
true
for compliance with RFC 2616. (default: false)stalewhilerevalidate Specifies the default number of seconds (the granularity is the second as the Response TTL precision is a second) during which the cache can immediately return a stale response while it revalidates it in the background (default: 2). This setting is overridden by the stale-while-revalidate HTTP Cache-Control extension (see RFC 5861).
staleiferror Specifies the default number of seconds (the granularity is the second) during which the cache can serve a stale response when an error is encountered (default: 60). This setting is overridden by the stale-if-error HTTP Cache-Control extension (see RFC 5861).
at line line 103
StoreInterface
getStore()
Gets the current store.
at line line 113
array
getTraces()
Returns an array of events that took place during processing of the last request.
at line line 123
string
getLog()
Returns a log message for the events of the last request processing.
at line line 138
Request
getRequest()
Gets the Request instance associated with the master request.
at line line 148
HttpKernelInterface
getKernel()
Gets the Kernel instance.
at line line 160
SurrogateInterface
getSurrogate()
Gets the Surrogate instance.