TwigPhpStorageCache::storage

protected TwigPhpStorageCache::storage() Gets the PHP code storage object to use for the compiled Twig files. Return value \Drupal\Component\PhpStorage\PhpStorageInterface File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 59 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code protected function storage() { if (!isset($this->storage)) { $this->storage = PhpStorageFactory::get('twig');

TwigPhpStorageCache::load

public TwigPhpStorageCache::load($key) Loads a template from the cache. Parameters string $key The cache key: Overrides Twig_CacheInterface::load File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 89 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code public function load($key) { $this->storage()->load($key); }

TwigPhpStorageCache::generateKey

public TwigPhpStorageCache::generateKey($name, $className) Generates a cache key for the given template class name. Parameters string $name The template name: string $className The template class name: Return value string Overrides Twig_CacheInterface::generateKey File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 69 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code public function generateKey($n

TwigPhpStorageCache::write

public TwigPhpStorageCache::write($key, $content) Writes the compiled template to cache. Parameters string $key The cache key: string $content The template representation as a PHP class: Overrides Twig_CacheInterface::write File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 96 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code public function write($key, $content) { $this->storage()->save($

TwigPhpStorageCache::getTimestamp

public TwigPhpStorageCache::getTimestamp($key) Returns the modification timestamp of a key. Parameters string $key The cache key: Return value int Overrides Twig_CacheInterface::getTimestamp File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 106 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code public function getTimestamp($key) { $cid = 'twig:' . $key; if ($cache = $this->cache->get($c

TwigPhpStorageCache::$templateCacheFilenamePrefix

The template cache filename prefix. Type: string File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 39 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code protected $templateCacheFilenamePrefix;

TwigPhpStorageCache::$storage

The PhpStorage object used for storing the templates. Type: \Drupal\Component\PhpStorage\PhpStorageInterface File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 32 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code protected $storage;

TwigPhpStorageCache::$cache

The cache object used for auto-refresh via mtime. Type: \Drupal\Core\Cache\CacheBackendInterface File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 25 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code protected $cache;

TwigNodeVisitor::getPriority

public TwigNodeVisitor::getPriority() File core/lib/Drupal/Core/Template/TwigNodeVisitor.php, line 60 Class TwigNodeVisitor Provides a Twig_NodeVisitor to change the generated parse-tree. Namespace Drupal\Core\Template Code public function getPriority() { // Just above the Optimizer, which is the normal last one. return 256; }

TwigPhpStorageCache

Provides an alternate cache storage for Twig using PhpStorage. This class is designed to work on setups with multiple webheads using a local filesystem for the twig cache. When generating the cache key, a hash value depending on the enabled extensions is included. This prevents stale templates from being reused when twig extensions are enabled or disabled. Hierarchy class \Drupal\Core\Template\TwigPhpStorageCache implements Twig_CacheInterface See also \Drupal\Core\DependencyInjection\Compi