Drupal 8  8.0.2
TwigPhpStorageCache Class Reference
Inheritance diagram for TwigPhpStorageCache:

Public Member Functions

 __construct (CacheBackendInterface $cache, $twig_extension_hash)
 
 generateKey ($name, $className)
 
 load ($key)
 
 write ($key, $content)
 
 getTimestamp ($key)
 

Protected Member Functions

 storage ()
 

Protected Attributes

 $cache
 
 $storage
 
 $templateCacheFilenamePrefix
 

Detailed Description

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.

See Also

Constructor & Destructor Documentation

__construct ( CacheBackendInterface  $cache,
  $twig_extension_hash 
)

Store cache backend and other information internally.

Parameters
\Drupal\Core\Cache\CacheBackendInterface$cacheThe cache bin.
string$twig_extension_hashThe Twig extension hash.

References Drupal\cache().

Here is the call graph for this function:

Member Function Documentation

generateKey (   $name,
  $className 
)

{}

getTimestamp (   $key)

{}

References Drupal\cache().

Here is the call graph for this function:

load (   $key)

{}

References TwigPhpStorageCache\storage().

Here is the call graph for this function:

storage ( )
protected

Gets the PHP code storage object to use for the compiled Twig files.

Returns

References PhpStorageFactory\get().

Referenced by TwigPhpStorageCache\load(), and TwigPhpStorageCache\write().

Here is the call graph for this function:

Here is the caller graph for this function:

write (   $key,
  $content 
)

{}

References Drupal\cache(), and TwigPhpStorageCache\storage().

Here is the call graph for this function:


The documentation for this class was generated from the following file: