diff options
author | wei <> | 2006-07-28 12:32:01 +0000 |
---|---|---|
committer | wei <> | 2006-07-28 12:32:01 +0000 |
commit | 623447ffea7a49359c773a0bc3a851397885f319 (patch) | |
tree | 93676acdeea5697dd00fb10d0eb70948901b549e /framework/DataAccess/TSQLMap.php | |
parent | fbf05a159bc1a688940c16dc304eaaf140188b01 (diff) |
Add sqlite support for time-tracker.
Diffstat (limited to 'framework/DataAccess/TSQLMap.php')
-rw-r--r-- | framework/DataAccess/TSQLMap.php | 9 |
1 files changed, 7 insertions, 2 deletions
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;
|