diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Repair/ClearFrontendCaches.php | 10 | ||||
-rw-r--r-- | lib/private/Template/JSCombiner.php | 4 | ||||
-rw-r--r-- | lib/private/Template/SCSSCacher.php | 4 |
3 files changed, 3 insertions, 15 deletions
diff --git a/lib/private/Repair/ClearFrontendCaches.php b/lib/private/Repair/ClearFrontendCaches.php index 8d109462f6a..0a92aa8d201 100644 --- a/lib/private/Repair/ClearFrontendCaches.php +++ b/lib/private/Repair/ClearFrontendCaches.php @@ -23,15 +23,11 @@ namespace OC\Repair; -use OC\Core\Command\Maintenance\ClearCacheJSCSS; use OC\Template\JSCombiner; use OC\Template\SCSSCacher; -use OCP\AppFramework\QueryException; use OCP\ICacheFactory; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; -use Symfony\Component\Console\Input\StringInput; -use Symfony\Component\Console\Output\BufferedOutput; class ClearFrontendCaches implements IRepairStep { @@ -59,17 +55,13 @@ class ClearFrontendCaches implements IRepairStep { public function run(IOutput $output) { try { $c = $this->cacheFactory->createDistributed('imagePath'); - $c->clear(''); + $c->clear(); $output->info('Image cache cleared'); $this->scssCacher->resetCache(); - $c = $this->cacheFactory->createDistributed('SCSS'); - $c->clear(''); $output->info('SCSS cache cleared'); $this->jsCombiner->resetCache(); - $c = $this->cacheFactory->createDistributed('JS'); - $c->clear(''); $output->info('JS cache cleared'); } catch (\Exception $e) { $output->warning('Unable to clear the frontend cache'); diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index b95a59834a6..c5adcee6854 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -236,10 +236,8 @@ class JSCombiner { * @throws NotFoundException */ public function resetCache() { + $this->depsCache->clear(); $appDirectory = $this->appData->getDirectoryListing(); - if(empty($appDirectory)){ - return; - } foreach ($appDirectory as $folder) { foreach ($folder->getDirectoryListing() as $file) { $file->delete(); diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php index eee437eaf62..433d5e5d0bf 100644 --- a/lib/private/Template/SCSSCacher.php +++ b/lib/private/Template/SCSSCacher.php @@ -263,10 +263,8 @@ class SCSSCacher { */ 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) { $file->delete(); |