* Merge: 18.4 version's framework and lib directory.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user