From e2335946cc8b1092ae023c640e0ac80638175080 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 27 Sep 2016 21:05:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E6=9F=90?= =?UTF-8?q?=E4=B8=AAurl=E5=90=8E=E7=BC=80=E7=9A=84=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E8=AF=B7=E6=B1=82=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/library/think/Request.php b/library/think/Request.php index 924f2e8f..fac244e8 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1486,7 +1486,14 @@ class Request } } elseif ('__URL__' == $key) { // 当前URL地址作为缓存标识 - $key = $this->url(); + $key = md5($this->url()); + } elseif (strpos($key, ']')) { + if ('[' . $this->ext() . ']' == $key) { + // 缓存某个后缀的请求 + $key = md5($this->url()); + } else { + return; + } } if (Cache::has($key)) { // 读取缓存