改进全局自动请求缓存对子域名的支持

This commit is contained in:
thinkphp
2017-02-09 10:29:45 +08:00
parent 89ee5379b7
commit 1cdb0ba693

View File

@@ -1523,13 +1523,13 @@ class Request
}
}
// 自动缓存功能
$key = '__URL__';
$key = md5($this->host()) . '__URL__';
} elseif (strpos($key, '|')) {
list($key, $fun) = explode('|', $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())], $key);
}
if (false !== strpos($key, ':')) {