You are here

class ResettablePageCache in Tome 8

Allows the cache ID to be reset between requests.

@internal

Hierarchy

  • class \Drupal\page_cache\StackMiddleware\PageCache implements \Symfony\Component\HttpKernel\HttpKernelInterface

Expanded class hierarchy of ResettablePageCache

2 files declare their use of ResettablePageCache
PageCacheRequestPrepareSubscriber.php in modules/tome_static/src/EventSubscriber/PageCacheRequestPrepareSubscriber.php
TomeStaticServiceProvider.php in modules/tome_static/src/TomeStaticServiceProvider.php

File

modules/tome_static/src/StackMiddleware/ResettablePageCache.php, line 12

Namespace

Drupal\tome_static\StackMiddleware
View source
class ResettablePageCache extends PageCache {

  /**
   * {@inheritdoc}
   */
  protected $cid;

  /**
   * Resets the cache ID.
   */
  public function resetCache() {
    $this->cid = NULL;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PageCache::$cache protected property The cache bin.
PageCache::$httpKernel protected property The wrapped HTTP kernel.
PageCache::$requestPolicy protected property A policy rule determining the cacheability of a request.
PageCache::$responsePolicy protected property A policy rule determining the cacheability of the response.
PageCache::fetch protected function Fetches a response from the backend and stores it in the cache.
PageCache::get protected function Returns a response object from the page cache.
PageCache::getCacheId protected function Gets the page cache ID for this request.
PageCache::handle public function Handles a Request to convert it to a Response.
PageCache::lookup protected function Retrieves a response from the cache or fetches it from the backend.
PageCache::pass protected function Sidesteps the page cache and directly forwards a request to the backend.
PageCache::set protected function Stores a response object in the page cache.
PageCache::storeResponse protected function Stores a response in the page cache.
PageCache::__construct public function Constructs a PageCache object.
ResettablePageCache::$cid protected property The cache ID for the (master) request. Overrides PageCache::$cid
ResettablePageCache::resetCache public function Resets the cache ID.