class HttpCache extends HttpCache

Manages HTTP cache objects in a Container.

Methods

__construct(HttpKernelInterface $kernel, string $cacheDir = null)

No description

getStore()

Gets the current store.

from HttpCache
array
getTraces()

Returns an array of events that took place during processing of the last request.

from HttpCache
string
getLog()

Returns a log message for the events of the last request processing.

from HttpCache
getRequest()

Gets the Request instance associated with the master request.

from HttpCache
getKernel()

Gets the Kernel instance.

from HttpCache
getSurrogate()

Gets the Surrogate instance.

from HttpCache
Esi
getEsi() deprecated

Gets the Esi instance.

from HttpCache
handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true)

Handles a Request to convert it to a Response.

from HttpCache
terminate(Request $request, Response $response)

Terminates a request/response cycle.

from HttpCache

Details

at line line 35
__construct(HttpKernelInterface $kernel, string $cacheDir = null)

Parameters

HttpKernelInterface $kernel
string $cacheDir The cache directory (default used if null)

in HttpCache at line line 96
StoreInterface getStore()

Gets the current store.

Return Value

StoreInterface $store A StoreInterface instance

in HttpCache at line line 106
array getTraces()

Returns an array of events that took place during processing of the last request.

Return Value

array An array of events

in HttpCache at line line 116
string getLog()

Returns a log message for the events of the last request processing.

Return Value

string A log message

in HttpCache at line line 131
Request getRequest()

Gets the Request instance associated with the master request.

Return Value

Request A Request instance

in HttpCache at line line 141
HttpKernelInterface getKernel()

Gets the Kernel instance.

Return Value

HttpKernelInterface An HttpKernelInterface instance

in HttpCache at line line 153
SurrogateInterface getSurrogate()

Gets the Surrogate instance.

Return Value

SurrogateInterface A Surrogate instance

Exceptions

LogicException

in HttpCache at line line 171
Esi getEsi() deprecated

deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead

Gets the Esi instance.

Return Value

Esi An Esi instance

Exceptions

LogicException

in HttpCache at line line 181
Response handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true)

Handles a Request to convert it to a Response.

When $catch is true, the implementation must catch all exceptions and do its best to convert them to a Response instance.

Parameters

Request $request A Request instance
int $type The type of the request (one of HttpKernelInterface::MASTERREQUEST or HttpKernelInterface::SUBREQUEST)
bool $catch Whether to catch exceptions or not

Return Value

Response A Response instance

Exceptions

Exception When an Exception occurs during processing

in HttpCache at line line 232
terminate(Request $request, Response $response)

Terminates a request/response cycle.

Should be called after sending the response and before shutting down the kernel.

Parameters

Request $request
Response $response