改进Request类cache方法

This commit is contained in:
thinkphp
2016-09-27 18:33:29 +08:00
parent e8290be253
commit 6278cf13e9
2 changed files with 21 additions and 19 deletions

View File

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