mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
Reduce the name of the cache directories to 1 character
This commit is contained in:
@@ -250,7 +250,7 @@ class Twig_Environment
|
||||
|
||||
$class = substr($this->getTemplateClass($name), strlen($this->templateClassPrefix));
|
||||
|
||||
return $this->getCache().'/'.substr($class, 0, 2).'/'.substr($class, 2, 2).'/'.substr($class, 4).'.php';
|
||||
return $this->getCache().'/'.$class[0].'/'.$class[1].'/'.$class.'.php';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1271,11 +1271,11 @@ class Twig_Environment
|
||||
if (false === @mkdir($dir, 0777, true)) {
|
||||
clearstatcache(false, $dir);
|
||||
if (!is_dir($dir)) {
|
||||
throw new RuntimeException(sprintf("Unable to create the cache directory (%s).", $dir));
|
||||
throw new RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir));
|
||||
}
|
||||
}
|
||||
} elseif (!is_writable($dir)) {
|
||||
throw new RuntimeException(sprintf("Unable to write in the cache directory (%s).", $dir));
|
||||
throw new RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir));
|
||||
}
|
||||
|
||||
$tmpFile = tempnam($dir, basename($file));
|
||||
|
||||
Reference in New Issue
Block a user