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

Dont cache empty url for not found routes
This commit is contained in:
Roeland Jago Douma 2019-10-21 12:06:49 +02:00 committed by GitHub
commit 8d094920c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

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;
}
}