请求缓存仅对GET请求有效

This commit is contained in:
thinkphp
2016-09-27 18:31:26 +08:00
parent 4bd9c4c915
commit e8290be253

View File

@@ -115,7 +115,7 @@ class Response
if (200 == $this->code) {
$cache = Request::instance()->getCache();
if ($cache) {
if ($cache && Request::instance()->isGet()) {
Cache::set($cache[0], $data, $cache[1]);
Cache::set($cache[0] . '_header', $this->header['Content-Type']);
}