mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
请求缓存仅对GET请求有效
This commit is contained in:
@@ -115,7 +115,7 @@ class Response
|
|||||||
|
|
||||||
if (200 == $this->code) {
|
if (200 == $this->code) {
|
||||||
$cache = Request::instance()->getCache();
|
$cache = Request::instance()->getCache();
|
||||||
if ($cache) {
|
if ($cache && Request::instance()->isGet()) {
|
||||||
Cache::set($cache[0], $data, $cache[1]);
|
Cache::set($cache[0], $data, $cache[1]);
|
||||||
Cache::set($cache[0] . '_header', $this->header['Content-Type']);
|
Cache::set($cache[0] . '_header', $this->header['Content-Type']);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user