summaryrefslogtreecommitdiffstats
path: root/lib/private/Template
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-10-15 15:59:21 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-10-16 13:28:00 +0200
commitcce716f9f3ed53874d2f88f187ec77c442d0a609 (patch)
tree61daf8fbc3cd11b212b62ea88310f9ad1ace1a3a /lib/private/Template
parent2456969b4121196f7578518a8f1bf5314bb21fc9 (diff)
downloadnextcloud-server-cce716f9f3ed53874d2f88f187ec77c442d0a609.tar.gz
nextcloud-server-cce716f9f3ed53874d2f88f187ec77c442d0a609.zip
Clear cached app config while waiting for the SCSSCache to finish processing the file
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Template')
-rw-r--r--lib/private/Template/SCSSCacher.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php
index 08400fd8c72..73f4a91a4f8 100644
--- a/lib/private/Template/SCSSCacher.php
+++ b/lib/private/Template/SCSSCacher.php
@@ -30,6 +30,7 @@
namespace OC\Template;
+use OC\AppConfig;
use OC\Files\AppData\Factory;
use OC\Memcache\NullCache;
use OCP\AppFramework\Utility\ITimeFactory;
@@ -89,6 +90,8 @@ class SCSSCacher {
/** @var IMemcache */
private $lockingCache;
+ /** @var AppConfig */
+ private $appConfig;
/**
* @param ILogger $logger
@@ -109,7 +112,8 @@ class SCSSCacher {
$serverRoot,
ICacheFactory $cacheFactory,
IconsCacher $iconsCacher,
- ITimeFactory $timeFactory) {
+ ITimeFactory $timeFactory,
+ AppConfig $appConfig) {
$this->logger = $logger;
$this->appData = $appDataFactory->get('css');
$this->urlGenerator = $urlGenerator;
@@ -126,6 +130,7 @@ class SCSSCacher {
$this->lockingCache = $lockingCache;
$this->iconsCacher = $iconsCacher;
$this->timeFactory = $timeFactory;
+ $this->appConfig = $appConfig;
}
/**
@@ -166,6 +171,7 @@ class SCSSCacher {
$retry = 0;
sleep(1);
while ($retry < 10) {
+ $this->appConfig->clearCachedConfig();
$this->logger->debug('SCSSCacher::process check in while loop follows', ['app' => 'scss_cacher']);
if (!$this->variablesChanged() && $this->isCached($fileNameCSS, $app)) {
// Inject icons vars css if any