diff --git a/modules/cms/classes/Theme.php b/modules/cms/classes/Theme.php index 8fabc4bf5..eb36938ee 100644 --- a/modules/cms/classes/Theme.php +++ b/modules/cms/classes/Theme.php @@ -340,10 +340,14 @@ class Theme } try { - $cacheKey = self::CONFIG_KEY.'::'.$this->getDirName(); - $config = Cache::rememberForever($cacheKey, function() use ($path) { - return Yaml::parseFile($path); - }); + if (Config::get('app.debug', false)) { + $config = Yaml::parseFile($path); + } else { + $cacheKey = self::CONFIG_KEY.'::'.$this->getDirName(); + $config = Cache::rememberForever($cacheKey, function() use ($path) { + return Yaml::parseFile($path); + }); + } } catch (Exception $ex) { // Cache failed