diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-05-16 10:30:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-16 10:30:59 -0500 |
commit | aa077d737f096443e960b39e2c9468572c77b0fe (patch) | |
tree | 4a50b9bf06c13455053a09598fa074d843e94781 /lib | |
parent | 78e6c2dea417f17db52648f6819ab20889e2554c (diff) | |
parent | 6afd098a94a1354209846eea8512bf876d7dcfa5 (diff) | |
download | nextcloud-server-aa077d737f096443e960b39e2c9468572c77b0fe.tar.gz nextcloud-server-aa077d737f096443e960b39e2c9468572c77b0fe.zip |
Merge pull request #4893 from nextcloud/fix_4886
Cache deps list to memcache on write not on first read
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Template/JSCombiner.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index 604cd2cceb7..8254174bfc0 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -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; |