mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
支持设置某个url后缀的访问进行请求缓存
This commit is contained in:
@@ -1486,7 +1486,14 @@ class Request
|
|||||||
}
|
}
|
||||||
} elseif ('__URL__' == $key) {
|
} elseif ('__URL__' == $key) {
|
||||||
// 当前URL地址作为缓存标识
|
// 当前URL地址作为缓存标识
|
||||||
$key = $this->url();
|
$key = md5($this->url());
|
||||||
|
} elseif (strpos($key, ']')) {
|
||||||
|
if ('[' . $this->ext() . ']' == $key) {
|
||||||
|
// 缓存某个后缀的请求
|
||||||
|
$key = md5($this->url());
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Cache::has($key)) {
|
if (Cache::has($key)) {
|
||||||
// 读取缓存
|
// 读取缓存
|
||||||
|
|||||||
Reference in New Issue
Block a user