class HttpCache extends HttpCache

Manages HTTP cache objects in a Container.

Methods

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

Constructor.

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
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 37
__construct(HttpKernelInterface $kernel, string $cacheDir = null)

Constructor.

Parameters

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

in HttpCache at line line 103
StoreInterface getStore()

Gets the current store.

Return Value

StoreInterface $store A StoreInterface instance

in HttpCache at line line 113
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 123
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 138
Request getRequest()

Gets the Request instance associated with the master request.

Return Value

Request A Request instance

in HttpCache at line line 148
HttpKernelInterface getKernel()

Gets the Kernel instance.

Return Value

HttpKernelInterface An HttpKernelInterface instance

in HttpCache at line line 160
SurrogateInterface getSurrogate()

Gets the Surrogate instance.

Return Value

SurrogateInterface A Surrogate instance

Exceptions

LogicException

in HttpCache at line line 168
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 220
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 A Request instance
Response $response A Response instance