Skip to content

Commit

Permalink
Исправил ошибку с некорректным обновлением кеша
Browse files Browse the repository at this point in the history
  • Loading branch information
mmjurov committed Jul 7, 2016
1 parent 63c5027 commit cf4d519
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Maximaster/Tools/Twig/BitrixLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BitrixLoader extends \Twig_Loader_Filesystem implements \Twig_LoaderInterf
*/
public function getSource($name)
{
return file_get_contents($this->getSourcePath($this->normalizeName($name)));
return file_get_contents($this->getSourcePath($name));
}

/** {@inheritdoc} */
Expand All @@ -43,7 +43,7 @@ public function getCacheKey($name)
*/
public function isFresh($name, $time)
{
return filemtime($this->getSource($name)) <= $time;
return filemtime($this->getSourcePath($name)) <= $time;
}

/**
Expand All @@ -55,6 +55,8 @@ public function isFresh($name, $time)
*/
public function getSourcePath($name)
{
$name = $this->normalizeName($name);

if (isset(static::$resolved[ $name ])) {
return static::$resolved[ $name ];
}
Expand Down

0 comments on commit cf4d519

Please sign in to comment.