From 9d866a7810ceb92ea558335d80466fa94fed8cca Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 15 May 2024 18:02:47 +0800 Subject: [PATCH] + baseDAO: load dao cache. --- lib/base/dao/dao.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/base/dao/dao.class.php b/lib/base/dao/dao.class.php index a1de811690..74fe40ac6c 100644 --- a/lib/base/dao/dao.class.php +++ b/lib/base/dao/dao.class.php @@ -189,6 +189,12 @@ class baseDAO $this->dbh = $dbh; $this->slaveDBH = $slaveDBH ? $slaveDBH : false; + if($config->cache->dao->enable) + { + $app->loadClass('cache', true); + $this->cache = new cache($config->cache->dao->driver, 'dao', $config->cache->dao->lifetime); + } + $this->reset(); }