改进全局请求缓存的缓存标识

This commit is contained in:
thinkphp
2017-03-22 12:08:12 +08:00
parent 8209f9f4b1
commit 6e27ae32a9

View File

@@ -1527,13 +1527,13 @@ class Request
} }
} }
// 自动缓存功能 // 自动缓存功能
$key = md5($this->host()) . '__URL__'; $key = '__URL__';
} elseif (strpos($key, '|')) { } elseif (strpos($key, '|')) {
list($key, $fun) = explode('|', $key); list($key, $fun) = explode('|', $key);
} }
// 特殊规则替换 // 特殊规则替换
if (false !== strpos($key, '__')) { if (false !== strpos($key, '__')) {
$key = str_replace(['__MODULE__', '__CONTROLLER__', '__ACTION__', '__URL__', ''], [$this->module, $this->controller, $this->action, md5($this->url())], $key); $key = str_replace(['__MODULE__', '__CONTROLLER__', '__ACTION__', '__URL__', ''], [$this->module, $this->controller, $this->action, md5($this->url(true))], $key);
} }
if (false !== strpos($key, ':')) { if (false !== strpos($key, ':')) {