* Merge: 18.4 version's framework and lib directory.

This commit is contained in:
hufangzhou
2023-11-14 16:58:03 +08:00
parent ff3ef94e32
commit a60622d4e4
9 changed files with 149 additions and 9 deletions
+15
View File
@@ -151,6 +151,7 @@ class baseModel
$this->loadDAO();
$this->setSuperVars();
$this->loadCache();
/**
* 读取当前模块的tao类。
@@ -324,6 +325,20 @@ class baseModel
$this->dao = $dao;
}
/**
* 加载缓存类。
* Load cache class.
*
* @access public
* @return void
*/
public function loadCache()
{
$this->app->loadClass('cache', $static = true);
$namespace = isset($this->session->user->account) ? $this->session->user->account : 'guest';
$this->cache = cache::create($this->config->cache->driver, $namespace, $this->config->cache->lifetime);
}
/**
* 删除记录。
* Delete one record.