diff --git a/sources/application/TwigBase/Twig/TwigHelper.php b/sources/application/TwigBase/Twig/TwigHelper.php index ad1bcfb39..9637d54d7 100644 --- a/sources/application/TwigBase/Twig/TwigHelper.php +++ b/sources/application/TwigBase/Twig/TwigHelper.php @@ -22,6 +22,10 @@ class TwigHelper $oLoader = new Twig_Loader_Filesystem($sViewPath); $oTwig = new Twig_Environment($oLoader); Extension::RegisterTwigExtensions($oTwig); + $sLocalPath = utils::LocalPath($sViewPath); + $sLocalPath = str_replace('env-'.utils::GetCurrentEnvironment(), 'twig', $sLocalPath); + $sCachePath = utils::GetCachePath().$sLocalPath; + $oTwig->setCache($sCachePath); return $oTwig; }