PageCache::__construct

public PageCache::__construct(HttpKernelInterface $http_kernel, CacheBackendInterface $cache, RequestPolicyInterface $request_policy, ResponsePolicyInterface $response_policy) Constructs a PageCache object. Parameters \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: The decorated kernel. \Drupal\Core\Cache\CacheBackendInterface $cache: The cache bin. \Drupal\Core\PageCache\RequestPolicyInterface $request_policy: A policy rule determining the cacheability of a request. \Drupal\Co

PageCache::set

protected PageCache::set(Request $request, Response $response, $expire, array $tags) Stores a response object in the page cache. Parameters \Symfony\Component\HttpFoundation\Request $request: A request object. \Symfony\Component\HttpFoundation\Response $response: The response to store in the cache. int $expire: One of the following values: CacheBackendInterface::CACHE_PERMANENT: Indicates that the item should not be removed unless it is deleted explicitly. A Unix timestamp: Indicates that th

PageCache::pass

protected PageCache::pass(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) Sidesteps the page cache and directly forwards a request to the backend. @returns \Symfony\Component\HttpFoundation\Response $response A response object. Parameters \Symfony\Component\HttpFoundation\Request $request: A request object. int $type: The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) bool $catch: Whether to catch exceptions or not File core/

PageCache::lookup

protected PageCache::lookup(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) Retrieves a response from the cache or fetches it from the backend. @returns \Symfony\Component\HttpFoundation\Response $response A response object. Parameters \Symfony\Component\HttpFoundation\Request $request: A request object. int $type: The type of the request (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) bool $catch: Whether to catch exceptions or not File core/mod

PageCache::handle

public PageCache::handle(Request $request, $type = self::MASTER_REQUEST, $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::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) bool $catch Whether to catch exceptions or not: Return value Response A Resp

PageCache::getCacheId

protected PageCache::getCacheId(Request $request) Gets the page cache ID for this request. Parameters \Symfony\Component\HttpFoundation\Request $request: A request object. Return value string The cache ID for this request. File core/modules/page_cache/src/StackMiddleware/PageCache.php, line 342 Class PageCache Executes the page caching before the main kernel takes over the request. Namespace Drupal\page_cache\StackMiddleware Code protected function getCacheId(Request $request) { $c

PageCache::get

protected PageCache::get(Request $request, $allow_invalid = FALSE) Returns a response object from the page cache. Parameters \Symfony\Component\HttpFoundation\Request $request: A request object. bool $allow_invalid: (optional) If TRUE, a cache item may be returned even if it is expired or has been invalidated. Such items may sometimes be preferred, if the alternative is recalculating the value stored in the cache, especially if another concurrent request is already recalculating the same value

PageCache::fetch

protected PageCache::fetch(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) Fetches a response from the backend and stores it in the cache. If page_compression is enabled, a gzipped version of the page is stored in the cache to avoid compressing the output on each request. The cache entry is unzipped in the relatively rare event that the page is requested by a client without gzip support. Page compression requires the PHP zlib extension (http://php.net/manual/ref.zlib.php). @retur

PageCache::$responsePolicy

A policy rule determining the cacheability of the response. Type: \Drupal\Core\PageCache\ResponsePolicyInterface File core/modules/page_cache/src/StackMiddleware/PageCache.php, line 48 Class PageCache Executes the page caching before the main kernel takes over the request. Namespace Drupal\page_cache\StackMiddleware Code protected $responsePolicy;

PageCache::$requestPolicy

A policy rule determining the cacheability of a request. Type: \Drupal\Core\PageCache\RequestPolicyInterface File core/modules/page_cache/src/StackMiddleware/PageCache.php, line 41 Class PageCache Executes the page caching before the main kernel takes over the request. Namespace Drupal\page_cache\StackMiddleware Code protected $requestPolicy;