Dont cache empty url for not found routes
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
64f1ad9381
commit
219905b9c8
|
@ -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…
Reference in New Issue