请求缓存支持缓存标签设置

This commit is contained in:
thinkphp
2017-08-17 14:22:53 +08:00
parent db965e1786
commit 5d80302da5
4 changed files with 15 additions and 6 deletions

View File

@@ -106,7 +106,7 @@ class Response
$this->header['Cache-Control'] = 'max-age=' . $cache[1] . ',must-revalidate';
$this->header['Last-Modified'] = gmdate('D, d M Y H:i:s') . ' GMT';
$this->header['Expires'] = gmdate('D, d M Y H:i:s', $_SERVER['REQUEST_TIME'] + $cache[1]) . ' GMT';
Cache::set($cache[0], [$data, $this->header], $cache[1]);
Cache::tag($cache[2])->set($cache[0], [$data, $this->header], $cache[1]);
}
}