+ [refac] generate cache config based on old configuration.

This commit is contained in:
liugang
2024-11-21 16:29:41 +08:00
committed by 孙广明
parent 4435beefce
commit 5f0ca3bc10
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -105,6 +105,7 @@ $config->upgrade->execFlow['20_5'] = array('functions' => 'fixWorkflowFie
$config->upgrade->execFlow['20_6'] = array('functions' => 'processDemandFiles,processSqlbuilderTables');
$config->upgrade->execFlow['20_7'] = array('functions' => 'upgradeMyDocSpace');
$config->upgrade->execFlow['20_8'] = array('functions' => 'processWorkflowGroups');
$config->upgrade->execFlow['21_1'] = array('functions' => 'processCacheConfig');
if(!empty($config->isINT))
{
+17
View File
@@ -10451,4 +10451,21 @@ class upgradeModel extends model
}
}
}
/**
* 根据旧的缓存配置生成新的缓存配置。
* Generate new cache config.
*
* @access public
* @return void
*/
public function processCacheConfig()
{
$cache = json_decode($this->config->global->cache);
if(!empty($cache->dao->enable))
{
$this->loadModel('install')->enableCache();
$this->loadModel('setting')->deleteItems('owner=system&module=common&section=global&key=cache');
}
}
}