* Rename cache configuration item.

This commit is contained in:
liugang
2024-05-22 16:25:25 +08:00
parent b699bc6e78
commit 7c826e1c3d
5 changed files with 6 additions and 8 deletions
+2 -4
View File
@@ -6,6 +6,8 @@ $config->cache->enable = false; // 是否开启缓存。Enable cache o
$config->cache->lifetime = 5 * 60; // 缓存生存时间。The lifetime of cache.
$config->cache->driver = 'File'; // 缓存驱动。 The driver of cache. can be File|Yac|Apcu.
$config->cache->enableDAO = false; // 是否开启 dao 缓存。Enable dao cache or not.
$config->cache->enableClient = false; // 是否开启客户端缓存。Enable client cache or not.
$config->cache->enableFullPage = false; // 是否开启整页缓存。Enable full page cache or not.
$config->cache->fullPageLifetime = 5 * 60;
$config->cache->fullPageDriver = 'File';
@@ -33,9 +35,5 @@ $config->cacheKeys->bug = new stdclass();
$config->cacheKeys->bug->browse = 'bugBrowse%s';
$config->cache->dao = new stdClass();
$config->cache->dao->enable = false; // 是否开启 dao 缓存。Enable dao cache or not.
$config->cache->dao->lifetime = 60 * 60 * 24 * 30; // 缓存生存时间,默认为 30 天。The lifetime of cache, default is 30 days.
$config->cache->dao->driver = 'Apcu'; // 缓存驱动,可以为 File|Yac|Apcu。The driver of cache. can be File|Yac|Apcu.
$config->cache->client = new stdClass();
$config->cache->client->enable = false; // 是否开启客户端缓存。Enable client cache or not.
+1 -1
View File
@@ -1064,7 +1064,7 @@ class baseControl
*/
public function setResponseHeader()
{
if($this->config->cache->client->enable && $this->app->useClientCache)
if($this->config->cache->enableClient && $this->app->useClientCache)
{
helper::setStatus(304);
helper::end();
+1 -1
View File
@@ -198,7 +198,7 @@ class baseDAO
$this->dbh = $dbh;
$this->slaveDBH = $slaveDBH ? $slaveDBH : false;
if($config->cache->dao->enable)
if($config->cache->enableDAO)
{
$app->loadClass('cache', true);
try
+1 -1
View File
@@ -36,7 +36,7 @@ $configContent = <<<EOT
\$config->webRoot = getWebRoot();
\$config->default->lang = '{$myConfig['defaultLang']}';
\$config->cache->dao->enable = true;
\$config->cache->enableDAO = true;
EOT;
if($customSession) $configContent .= "\n\$config->customSession = true;";
+1 -1
View File
@@ -337,7 +337,7 @@ class installZen extends install
\$config->webRoot = getWebRoot();
\$config->default->lang = getenv('ZT_DEFAULT_LANG');
\$config->cache->dao->enable = true;
\$config->cache->enableDAO = true;
\$hasSlaveDB = (string)getenv('ENABLE_DB_SLAVE');
if(\$hasSlaveDB && \$hasSlaveDB != 'false')