class HttpCache extends HttpCache (View source)

Manages HTTP cache objects in a Container.

Properties

protected null|string $cacheDir
protected Kernel $kernel

Methods

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

Constructor.

Response
forward(Request $request, bool $raw = false, Response $entry = null)

Forwards the Request to the backend and returns the Response.

array
getOptions()

Returns an array of options to customize the Cache configuration.

createSurrogate()

No description

createStore()

No description

Details

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

Constructor.

Parameters

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

protected Response forward(Request $request, bool $raw = false, Response $entry = null)

Forwards the Request to the backend and returns the Response.

Parameters

Request $request A Request instance
bool $raw Whether to catch exceptions or not
Response $entry A Response instance (the stale entry if present, null otherwise)

Return Value

Response A Response instance

protected array getOptions()

Returns an array of options to customize the Cache configuration.

Return Value

array An array of options

protected createSurrogate()

protected createStore()