[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/ -> HttpCache.php (summary)

(no description)

File Size: 684 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HttpCache:: (22 methods):
  __construct()
  getStore()
  getTraces()
  getLog()
  getRequest()
  getKernel()
  getEsi()
  handle()
  terminate()
  pass()
  invalidate()
  lookup()
  validate()
  fetch()
  forward()
  isFreshEnough()
  lock()
  store()
  restoreResponseBody()
  processResponseBody()
  isPrivateRequest()
  record()


Class: HttpCache  - X-Ref

Cache provides HTTP caching.

__construct(HttpKernelInterface $kernel, StoreInterface $store, Esi $esi = null, array $options = array()   X-Ref
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)

* stale_while_revalidate 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).

* stale_if_error         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).

param: HttpKernelInterface $kernel  An HttpKernelInterface instance
param: StoreInterface      $store   A Store instance
param: Esi                 $esi     An Esi instance
param: array               $options An array of options

getStore()   X-Ref
Gets the current store.

return: StoreInterface $store A StoreInterface instance

getTraces()   X-Ref
Returns an array of events that took place during processing of the last request.

return: array An array of events

getLog()   X-Ref
Returns a log message for the events of the last request processing.

return: string A log message

getRequest()   X-Ref
Gets the Request instance associated with the master request.

return: Request A Request instance

getKernel()   X-Ref
Gets the Kernel instance.

return: HttpKernelInterface An HttpKernelInterface instance

getEsi()   X-Ref
Gets the Esi instance.

return: Esi An Esi instance

handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)   X-Ref
{@inheritdoc}


terminate(Request $request, Response $response)   X-Ref
{@inheritdoc}


pass(Request $request, $catch = false)   X-Ref
Forwards the Request to the backend without storing the Response in the cache.

param: Request $request A Request instance
param: bool    $catch   Whether to process exceptions
return: Response A Response instance

invalidate(Request $request, $catch = false)   X-Ref
Invalidates non-safe methods (like POST, PUT, and DELETE).

param: Request $request A Request instance
param: bool    $catch   Whether to process exceptions
return: Response A Response instance

lookup(Request $request, $catch = false)   X-Ref
Lookups a Response from the cache for the given Request.

When a matching cache entry is found and is fresh, it uses it as the
response without forwarding any request to the backend. When a matching
cache entry is found but is stale, it attempts to "validate" the entry with
the backend using conditional GET. When no matching cache entry is found,
it triggers "miss" processing.

param: Request $request A Request instance
param: bool    $catch   whether to process exceptions
return: Response A Response instance

validate(Request $request, Response $entry, $catch = false)   X-Ref
Validates that a cache entry is fresh.

The original request is used as a template for a conditional
GET request with the backend.

param: Request  $request A Request instance
param: Response $entry   A Response instance to validate
param: bool     $catch   Whether to process exceptions
return: Response A Response instance

fetch(Request $request, $catch = false)   X-Ref
Forwards the Request to the backend and determines whether the response should be stored.

This methods is triggered when the cache missed or a reload is required.

param: Request $request A Request instance
param: bool    $catch   whether to process exceptions
return: Response A Response instance

forward(Request $request, $catch = false, Response $entry = null)   X-Ref
Forwards the Request to the backend and returns the Response.

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

isFreshEnough(Request $request, Response $entry)   X-Ref
Checks whether the cache entry is "fresh enough" to satisfy the Request.

param: Request  $request A Request instance
param: Response $entry   A Response instance
return: bool true if the cache entry if fresh enough, false otherwise

lock(Request $request, Response $entry)   X-Ref
Locks a Request during the call to the backend.

param: Request  $request A Request instance
param: Response $entry   A Response instance
return: bool true if the cache entry can be returned even if it is staled, false otherwise

store(Request $request, Response $response)   X-Ref
Writes the Response to the cache.

param: Request  $request  A Request instance
param: Response $response A Response instance

restoreResponseBody(Request $request, Response $response)   X-Ref
Restores the Response body.

param: Request  $request  A Request instance
param: Response $response A Response instance

processResponseBody(Request $request, Response $response)   X-Ref
No description

isPrivateRequest(Request $request)   X-Ref
Checks if the Request includes authorization or other sensitive information
that should cause the Response to be considered private by default.

param: Request $request A Request instance
return: bool true if the Request is private, false otherwise

record(Request $request, $event)   X-Ref
Records that an event took place.

param: Request $request A Request instance
param: string  $event   The event name



Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1