Caching of simple queries against primary key.

This commit is contained in:
Josh Sherman 2011-10-30 20:49:23 -04:00
parent 4b96d28bb7
commit e104250597
4 changed files with 120 additions and 18 deletions

View file

@ -85,7 +85,7 @@ abstract class Database_Common extends Object
* @access protected
* @var boolean
*/
protected $caching = false;
protected $cache = false;
/**
* Connection resource
@ -185,13 +185,13 @@ abstract class Database_Common extends Object
}
/**
* Set Caching
* Set Cache
*
* @param boolean whether or not to use cache
*/
public function setCaching($caching)
public function setCache($cache)
{
return $this->caching = $caching;
return $this->cache = $cache;
}
/**
@ -207,6 +207,18 @@ abstract class Database_Common extends Object
return $this->driver;
}
/**
* Get Cache
*
* Returns the status of caching for this datasource.
*
* @return string whether or not to use the cache
*/
public function getCache()
{
return $this->cache;
}
/**
* Opens database connection
*