Set SCSS dependencies to memcache on compile

Else when an upgrade happens we will recompile all the SCSS files all
the time (until the cache expires).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-05-21 22:10:00 +02:00
parent b6f5e623bb
commit cf1f77537d
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 3 additions and 1 deletions

View File

@ -226,7 +226,9 @@ class SCSSCacher {
try {
$data = $this->rebaseUrls($compiledScss, $webDir);
$cachedfile->putContent($data);
$depFile->putContent(json_encode($scss->getParsedFiles()));
$deps = json_encode($scss->getParsedFiles());
$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']);
return true;