diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-03-21 21:53:20 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-03-22 20:14:08 +0100 |
commit | e3925ba2a1de18692f2687569c1f490a24ec11d3 (patch) | |
tree | 80652f6927a23ac680921ecbdc36d7ea5a9a3185 /lib/private/TemplateLayout.php | |
parent | 8b75e9b8a01f4dcd8404d1231f96461a4f405c67 (diff) | |
download | nextcloud-server-e3925ba2a1de18692f2687569c1f490a24ec11d3.tar.gz nextcloud-server-e3925ba2a1de18692f2687569c1f490a24ec11d3.zip |
Cache SCSS dependency file in memcache
Since reading a file from disks can be costly. Lets store the dependency
json also in memcache.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 33f61e3c3ac..3206a1d3ba8 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -213,12 +213,15 @@ class TemplateLayout extends \OC_Template { $theme = \OC_Util::getTheme(); if($compileScss) { + /** @var \OC\Memcache\Factory $cache */ + $cache = \OC::$server->query('MemCacheFactory'); $SCSSCacher = new SCSSCacher( \OC::$server->getLogger(), \OC::$server->getAppDataDir('css'), \OC::$server->getURLGenerator(), \OC::$server->getConfig(), - \OC::$SERVERROOT + \OC::$SERVERROOT, + $cache->createLocal('SCSS') ); } else { $SCSSCacher = null; |