From 623447ffea7a49359c773a0bc3a851397885f319 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 28 Jul 2006 12:32:01 +0000 Subject: Add sqlite support for time-tracker. --- framework/DataAccess/TSQLMap.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'framework/DataAccess/TSQLMap.php') diff --git a/framework/DataAccess/TSQLMap.php b/framework/DataAccess/TSQLMap.php index 27973047..956593de 100644 --- a/framework/DataAccess/TSQLMap.php +++ b/framework/DataAccess/TSQLMap.php @@ -11,6 +11,11 @@ class TSQLMap extends TModule */ const CONFIG_FILE_EXT='.xml'; + protected function getCacheKey() + { + return $this->getID().$this->getConfigFile(); + } + /** * Saves the current sqlmap instance to cache. * @return boolean true if sqlmap was cached, false otherwise. @@ -21,7 +26,7 @@ class TSQLMap extends TModule { $cache = $this->getApplication()->getCache(); if(!is_null($cache)) - return $cache->add($this->getID(), $this->_sqlmap); + return $cache->add($this->getCacheKey(), $this->_sqlmap); } return false; } @@ -37,7 +42,7 @@ class TSQLMap extends TModule $cache = $this->getApplication()->getCache(); Prado::using('System.DataAccess.SQLMap.TSqlMapper'); if(!is_null($cache)) - $this->_sqlmap = $cache->get($this->getID()); + $this->_sqlmap = $cache->get($this->getCacheKey()); return $this->_sqlmap instanceof TSqlMapper; } return false; -- cgit v1.2.3