Symfony\Component\HttpKernel\HttpCache\HttpCache
Cache provides HTTP caching.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class HttpCache
implements
HttpKernelInterface,TerminableInterface
{
- // members
- private $kernel;
- private $store;
- private $request;
- private $esi;
- private $esiCacheStrategy;
- private $traces;
- // methods
- public void __construct()
- public StoreInterface getStore()
- public array getTraces()
- public string getLog()
- public Request getRequest()
- public HttpKernelInterface getKernel()
- public Esi getEsi()
- public void handle()
- public void terminate()
- protected Response pass()
- protected Response invalidate()
- protected Response lookup()
- protected Response validate()
- protected Response fetch()
- protected Response forward()
- protected Boolean isFreshEnough()
- protected Boolean lock()
- protected void store()
- private Response restoreResponseBody()
- protected void processResponseBody()
- private Boolean isPrivateRequest()
- private void record()
Hierarchy
Extended by
Implements
Constants
Name | Value |
---|---|
MASTER_REQUEST | 1 |
SUB_REQUEST | 2 |
Members
private
- $esi
- $esiCacheStrategy
- $kernel
- $request
- $store
- $traces
Methods
private
- isPrivateRequest() — Checks if the Request includes authorization or other sensitive information that should cause the Response to be considered private by default.
- record() — Records that an event took place.
- restoreResponseBody() — Restores the Response body.
protected
- fetch() — Forwards the Request to the backend and determines whether the response should be stored.
- forward() — Forwards the Request to the backend and returns the Response.
- invalidate() — Invalidates non-safe methods (like POST, PUT, and DELETE).
- isFreshEnough() — Checks whether the cache entry is "fresh enough" to satisfy the Request.
- lock() — Locks a Request during the call to the backend.
- lookup() — Lookups a Response from the cache for the given Request.
- pass() — Forwards the Request to the backend without storing the Response in the cache.
- processResponseBody()
- store() — Writes the Response to the cache.
- validate() — Validates that a cache entry is fresh.
public
- __construct() — Constructor.
- getEsi() — Gets the Esi instance
- getKernel() — Gets the Kernel instance
- getLog() — Returns a log message for the events of the last request processing.
- getRequest() — Gets the Request instance associated with the master request.
- getStore() — Gets the current store.
- getTraces() — Returns an array of events that took place during processing of the last request.
- handle() — {@inheritdoc}
- terminate() — {@inheritdoc}