You are here

public function Twig_Cache_Filesystem::generateKey in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Cache/Filesystem.php \Twig_Cache_Filesystem::generateKey()

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

vendor/twig/twig/lib/Twig/Cache/Filesystem.php, line 37

Class

Twig_Cache_Filesystem
Implements a cache on the filesystem.

Code

public function generateKey($name, $className) {
  $hash = hash('sha256', $className);
  return $this->directory . '/' . $hash[0] . $hash[1] . '/' . $hash . '.php';
}