mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
修正cache方法的变量规则检查位置
This commit is contained in:
@@ -1464,7 +1464,6 @@ class Request
|
|||||||
*/
|
*/
|
||||||
public function cache($key, $expire = null)
|
public function cache($key, $expire = null)
|
||||||
{
|
{
|
||||||
if (Cache::has($key)) {
|
|
||||||
if (false !== strpos($key, ':')) {
|
if (false !== strpos($key, ':')) {
|
||||||
$param = $this->param();
|
$param = $this->param();
|
||||||
foreach ($param as $item => $val) {
|
foreach ($param as $item => $val) {
|
||||||
@@ -1473,6 +1472,7 @@ class Request
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Cache::has($key)) {
|
||||||
// 读取缓存
|
// 读取缓存
|
||||||
$content = Cache::get($key);
|
$content = Cache::get($key);
|
||||||
$response = Response::create($content)->header('Content-Type', Cache::get($key . '_header'));
|
$response = Response::create($content)->header('Content-Type', Cache::get($key . '_header'));
|
||||||
|
|||||||
Reference in New Issue
Block a user