diff options
Diffstat (limited to 'lib/private/Template/JSCombiner.php')
-rw-r--r-- | lib/private/Template/JSCombiner.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index 6a67dd0dede..b95a59834a6 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -184,9 +184,10 @@ class JSCombiner { $depFile->putContent($deps); $this->depsCache->set($folder->getName() . '-' . $depFileName, $deps); $gzipFile->putContent(gzencode($res, 9)); - + $this->logger->debug('JSCombiner: successfully cached: ' . $fileName); return true; } catch (NotPermittedException $e) { + $this->logger->error('JSCombiner: unable to cache: ' . $fileName); return false; } } @@ -227,4 +228,22 @@ class JSCombiner { return $result; } + + + /** + * Clear cache with combined javascript files + * + * @throws NotFoundException + */ + public function resetCache() { + $appDirectory = $this->appData->getDirectoryListing(); + if(empty($appDirectory)){ + return; + } + foreach ($appDirectory as $folder) { + foreach ($folder->getDirectoryListing() as $file) { + $file->delete(); + } + } + } } |