diff options
Diffstat (limited to 'lib/private/Template/SCSSCacher.php')
-rw-r--r-- | lib/private/Template/SCSSCacher.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index 8830a651f36..433d5e5d0bf 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -249,9 +249,10 @@ class SCSSCacher { $depFile->putContent($deps); $this->depsCache->set($folder->getName() . '-' . $depFileName, $deps); $gzipFile->putContent(gzencode($data, 9)); - $this->logger->debug($webDir.'/'.$fileNameSCSS.' compiled and successfully cached', ['app' => 'core']); + $this->logger->debug('SCSSCacher: '.$webDir.'/'.$fileNameSCSS.' compiled and successfully cached', ['app' => 'core']); return true; } catch(NotPermittedException $e) { + $this->logger->error('SCSSCacher: unable to cache: ' . $fileNameSCSS); return false; } } @@ -260,17 +261,13 @@ class SCSSCacher { * Reset scss cache by deleting all generated css files * We need to regenerate all files when variables change */ - private function resetCache() { + public function resetCache() { $this->injectedVariables = null; + $this->depsCache->clear(); $appDirectory = $this->appData->getDirectoryListing(); - if(empty($appDirectory)){ - return; - } foreach ($appDirectory as $folder) { foreach ($folder->getDirectoryListing() as $file) { - if (substr($file->getName(), -3) === 'css' || substr($file->getName(), -4) === 'deps') { - $file->delete(); - } + $file->delete(); } } } |