summaryrefslogtreecommitdiff
path: root/framework/DataAccess/SQLMap/Configuration/TSqlMapCacheModel.php
diff options
context:
space:
mode:
authorwei <>2006-04-14 11:23:56 +0000
committerwei <>2006-04-14 11:23:56 +0000
commitf6a5e7589396854e10e023c25237b47e512ff047 (patch)
tree2b313bb8b66869235ee06b9cae2af2f7645cf5c9 /framework/DataAccess/SQLMap/Configuration/TSqlMapCacheModel.php
parent3d3f8d3832921f99daf8ce1953304763c2e76c62 (diff)
Adding SQLMap unit tests. Allow sqlmap to use Prado's caching module to cache records.
Diffstat (limited to 'framework/DataAccess/SQLMap/Configuration/TSqlMapCacheModel.php')
-rw-r--r--framework/DataAccess/SQLMap/Configuration/TSqlMapCacheModel.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/framework/DataAccess/SQLMap/Configuration/TSqlMapCacheModel.php b/framework/DataAccess/SQLMap/Configuration/TSqlMapCacheModel.php
index 6c945155..3bd20933 100644
--- a/framework/DataAccess/SQLMap/Configuration/TSqlMapCacheModel.php
+++ b/framework/DataAccess/SQLMap/Configuration/TSqlMapCacheModel.php
@@ -3,11 +3,11 @@
class TSqlMapCacheModel extends TComponent
{
private $_cache;
- private $_flushInterval = -1;
+// private $_flushInterval = -1;
private $_hits = 0;
private $_requests = 0;
private $_id;
- private $_lastFlush;
+// private $_lastFlush;
private $_implementation;
private $_properties = array();
@@ -18,15 +18,15 @@ class TSqlMapCacheModel extends TComponent
public function getImplementation(){ return $this->_implementation; }
public function setImplementation($value){ $this->_implementation = $value; }
- public function getFlushInterval(){ return $this->_flushInterval; }
- public function setFlushInterval($value){ $this->_flushInterval = $value; }
+// public function getFlushInterval(){ return $this->_flushInterval; }
+// public function setFlushInterval($value){ $this->_flushInterval = $value; }
public function initialize($sqlMap)
{
$implementation = $this->getImplementationClass(
$sqlMap->getTypeHandlerFactory());
$this->_cache = new $implementation;
- $this->_cache->configure($this->_properties);
+ $this->_cache->configure($this, $this->_properties);
}
protected function getImplementationClass($typeFactory)
@@ -35,6 +35,7 @@ class TSqlMapCacheModel extends TComponent
{
case 'fifo': return 'TSqlMapFifoCache';
case 'lru' : return 'TSqlMapLruCache';
+ case 'basic' : return 'TSqlMapApplicationCache';
}
if(class_exists($this->_implementation, false))
@@ -66,7 +67,6 @@ class TSqlMapCacheModel extends TComponent
public function flush()
{
- var_dump("flush!");
$this->_cache->flush();
}