Merge pull request #6949 from nextcloud/cachingrouter_local
Use local cache for the CachingRouter
This commit is contained in:
commit
a9f78856b5
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue