Merge pull request #4893 from nextcloud/fix_4886

Cache deps list to memcache on write not on first read
This commit is contained in:
Morris Jobke 2017-05-16 10:30:59 -05:00 committed by GitHub
commit aa077d737f

View file

@ -101,7 +101,6 @@ class JSCombiner {
if ($deps === null || $deps === '') {
$depFile = $folder->getFile($fileName);
$deps = $depFile->getContent();
$this->depsCache->set($folder->getName() . '-' . $fileName, $deps);
}
$deps = json_decode($deps, true);
@ -162,8 +161,11 @@ class JSCombiner {
try {
$cachedfile->putContent($res);
$depFile->putContent(json_encode($deps));
$deps = json_encode($deps);
$depFile->putContent($deps);
$this->depsCache->set($folder->getName() . '-' . $depFileName, $deps);
$gzipFile->putContent(gzencode($res, 9));
return true;
} catch (NotPermittedException $e) {
return false;