Pass parameters to route cache - Fixes #1088
This commit is contained in:
parent
cacec27d25
commit
10ec177c54
|
|
@ -96,6 +96,9 @@ class Router
|
|||
|
||||
if ($cacheable) {
|
||||
$fileName = $this->getCachedUrlFileName($url, $urlList);
|
||||
if (is_array($fileName)) {
|
||||
list($fileName, $this->parameters) = $fileName;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -113,7 +116,9 @@ class Router
|
|||
$urlList = [];
|
||||
}
|
||||
|
||||
$urlList[$url] = $fileName;
|
||||
$urlList[$url] = !empty($this->parameters)
|
||||
? [$fileName, $this->parameters]
|
||||
: $fileName;
|
||||
|
||||
$key = $this->getUrlListCacheKey();
|
||||
Cache::put($key, serialize($urlList), Config::get('cms.urlCacheTtl', 1));
|
||||
|
|
|
|||
Loading…
Reference in New Issue