diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-17 12:35:47 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-03-17 12:35:47 +0100 |
commit | 9e2ebf2dcea8d3e1ee153eba43124ca95c496443 (patch) | |
tree | d48d32dcd87aa77304c7dd9f0acc6d79fd2993fd /lib/private/server.php | |
parent | d96b97043b2fa7ba4d676c1d7b44f4aa5e58c8ee (diff) | |
download | nextcloud-server-9e2ebf2dcea8d3e1ee153eba43124ca95c496443.tar.gz nextcloud-server-9e2ebf2dcea8d3e1ee153eba43124ca95c496443.zip |
Cache \OC\URLGenerator::imagePath
\OC\URLGenerator::imagePath is a really expensive operation due to all the I/O handling and can really benefit from caching.
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index 2f688c47f09..cfad80fb5bc 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -147,7 +147,11 @@ class Server extends SimpleContainer implements IServerContainer { }); $this->registerService('URLGenerator', function (Server $c) { $config = $c->getConfig(); - return new \OC\URLGenerator($config); + $cacheFactory = $c->getMemCacheFactory(); + return new \OC\URLGenerator( + $config, + $cacheFactory + ); }); $this->registerService('AppHelper', function ($c) { return new \OC\AppHelper(); |