[ Index ]

PHP Cross Reference of phpBB-3.2.8-deutsch

title

Body

[close]

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

(no description)

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

Defines 1 class

HttpCache:: (23 methods):
  __construct()
  getStore()
  getTraces()
  getLog()
  getRequest()
  getKernel()
  getSurrogate()
  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, SurrogateInterface $surrogate = 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).

getStore()   X-Ref
Gets the current store.

return: StoreInterface 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

getSurrogate()   X-Ref
Gets the Surrogate instance.

return: SurrogateInterface A Surrogate 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.

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.

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.


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


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.

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: Tue Apr 7 19:42:26 2020 Cross-referenced by PHPXref 0.7.1