summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-10-21 12:06:49 +0200
committerGitHub <noreply@github.com>2019-10-21 12:06:49 +0200
commit8d094920c3fa8462ee42ad77138845098bd96a23 (patch)
tree619b30135268d66db8531fb62c8bc4e4c78e2d96
parenta7193ce781330c8050bafb8d4fc873846c6a8b9b (diff)
parent219905b9c881eb72b0e6398e022e80bc6763159b (diff)
downloadnextcloud-server-8d094920c3fa8462ee42ad77138845098bd96a23.tar.gz
nextcloud-server-8d094920c3fa8462ee42ad77138845098bd96a23.zip
Merge pull request #17594 from nextcloud/dont-cache-notfound
Dont cache empty url for not found routes
-rw-r--r--lib/private/Route/CachingRouter.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Route/CachingRouter.php b/lib/private/Route/CachingRouter.php
index cb1b98d77e6..a37bbf5b701 100644
--- a/lib/private/Route/CachingRouter.php
+++ b/lib/private/Route/CachingRouter.php
@@ -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;
}
}