Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NullCache.php

class NullCache

Implements a no-cache strategy.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

  • class \Twig\Cache\NullCache implements \Twig\Cache\CacheInterface, \Twig\Cache\RemovableCacheInterface

Expanded class hierarchy of NullCache

1 file declares its use of NullCache
Environment.php in vendor/twig/twig/src/Environment.php

File

vendor/twig/twig/src/Cache/NullCache.php, line 19

Namespace

Twig\Cache
View source
final class NullCache implements CacheInterface, RemovableCacheInterface {
    public function generateKey(string $name, string $className) : string {
        return '';
    }
    public function write(string $key, string $content) : void {
    }
    public function load(string $key) : void {
    }
    public function getTimestamp(string $key) : int {
        return 0;
    }
    public function remove(string $name, string $cls) : void {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
NullCache::generateKey public function Generates a cache key for the given template class name. Overrides CacheInterface::generateKey
NullCache::getTimestamp public function Returns the modification timestamp of a key. Overrides CacheInterface::getTimestamp
NullCache::load public function Loads a template from the cache. Overrides CacheInterface::load
NullCache::remove public function Overrides RemovableCacheInterface::remove
NullCache::write public function Writes the compiled template to cache. Overrides CacheInterface::write
RSS feed
Powered by Drupal