for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ubiquity\cache\database;
/**
* Ubiquity\cache\database$MemoryCache
* This class is part of Ubiquity
*
* @author jcheron <[email protected]>
* @version 1.0.1
*/
class MemoryCache extends DbCache {
* @var array
protected $memoryCache;
public function __construct() {
}
public function fetch($tableName, $condition) {
$key = $this->getKey ( $tableName, $condition );
if (isset ( $this->memoryCache [$key] )) {
return $this->memoryCache [$key];
return false;
public function store($tableName, $condition, $result) {
$this->memoryCache [$this->getKey ( $tableName, $condition )] = $result;
public function delete($tableName, $condition) {
unset ( $this->memoryCache [$key] );
return true;