mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
请求缓存支持缓存标签设置
This commit is contained in:
@@ -1512,12 +1512,13 @@ class Route
|
||||
if ($request->isGet() && isset($option['cache'])) {
|
||||
$cache = $option['cache'];
|
||||
if (is_array($cache)) {
|
||||
list($key, $expire) = $cache;
|
||||
list($key, $expire, $tag) = array_pad($cache, 3, null);
|
||||
} else {
|
||||
$key = str_replace('|', '/', $pathinfo);
|
||||
$expire = $cache;
|
||||
$tag = null;
|
||||
}
|
||||
$request->cache($key, $expire);
|
||||
$request->cache($key, $expire, $tag);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user