diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-10-25 08:29:28 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-10-25 19:23:46 +0200 |
commit | 88cba6d8821a77d86573524eb76daee6978a551a (patch) | |
tree | 1a6c613294e858ce5148afd57b665ba9cf61b9a3 | |
parent | c85deacddbbf6d8f2818df68708394ee45c970b4 (diff) | |
download | nextcloud-server-88cba6d8821a77d86573524eb76daee6978a551a.tar.gz nextcloud-server-88cba6d8821a77d86573524eb76daee6978a551a.zip |
Use local cache for the CachingRouter
There is no need to cache routes distributed. It even has the downside
that the router might return different routes then the ones in the local
routes.php files.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | lib/private/Server.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 29aee06d896..84c09c8e6db 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -532,8 +532,8 @@ class Server extends ServerContainer implements IServerContainer { $this->registerService(\OCP\Route\IRouter::class, function (Server $c) { $cacheFactory = $c->getMemCacheFactory(); $logger = $c->getLogger(); - if ($cacheFactory->isAvailable()) { - $router = new \OC\Route\CachingRouter($cacheFactory->create('route'), $logger); + if ($cacheFactory->isAvailableLowLatency()) { + $router = new \OC\Route\CachingRouter($cacheFactory->createLocal('route'), $logger); } else { $router = new \OC\Route\Router($logger); } |