请求缓存标识支持传入__URL__ 表示当前url地址作为缓存标识进行请求缓存

This commit is contained in:
thinkphp
2016-09-27 18:25:09 +08:00
parent afa348bc46
commit 4bd9c4c915

View File

@@ -1483,6 +1483,9 @@ class Request
$key = str_replace(':' . $item, $val, $key);
}
}
} elseif ('__URL__' == $key) {
// 当前URL地址作为缓存标识
$key = $this->url();
}
if (Cache::has($key)) {
// 读取缓存