Pass parameters to route cache - Fixes #1088

This commit is contained in:
Samuel Georges 2015-04-28 20:04:35 +10:00
parent cacec27d25
commit 10ec177c54
1 changed files with 6 additions and 1 deletions

View File

@ -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));