diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index 48f6dadfd6acb..caf6ec43dae9d 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -121,7 +121,9 @@ protected function isCached($fileName, ISimpleFolder $folder) { $fileName = $fileName . '.deps'; try { $deps = $this->depsCache->get($folder->getName() . '-' . $fileName); + $fromCache = true; if ($deps === null || $deps === '') { + $fromCache = false; $depFile = $folder->getFile($fileName); $deps = $depFile->getContent(); } @@ -144,6 +146,10 @@ protected function isCached($fileName, ISimpleFolder $folder) { } } + if ($fromCache === false) { + $this->depsCache->set($folder->getName() . '-' . $fileName, json_encode($deps)); + } + return true; } catch (NotFoundException $e) { return false;