Browse Source

Merge pull request #17594 from nextcloud/dont-cache-notfound

Dont cache empty url for not found routes
tags/v18.0.0beta1
Roeland Jago Douma 4 years ago
parent
commit
8d094920c3
No account linked to committer's email address
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      lib/private/Route/CachingRouter.php

+ 3
- 1
lib/private/Route/CachingRouter.php View File

@@ -58,7 +58,9 @@ class CachingRouter extends Router {
return $cachedKey;
} else {
$url = parent::generate($name, $parameters, $absolute);
$this->cache->set($key, $url, 3600);
if ($url) {
$this->cache->set($key, $url, 3600);
}
return $url;
}
}

Loading…
Cancel
Save