* @license PHP License * @package WB * @subpackage base */ /** * Caching: abstract cache driver * * Abstract driver defines the interface. * Make sure al derived class load and store index properly! * * @version 0.1.0 * @package WB * @subpackage base */ abstract class WBCache_Driver { /** * cache index * * Make this index presistent! * @var array */ protected $_index = array(); /** * fetch information from index * * This will return a reference to the index! * * @return index list */ public function &getIndex() { return $this->_index; } /** * fetch cached data * * @param string $id cache id * @return mixed return data or null if not cached yet */ abstract public function get( $id ); /** * store data in cache * * @param string $id cache id * @return mixed return data or null if not cached yet */ abstract public function set( $id, $data ); /** * flush cached data * * @param string $id cache id * @return bool true on success */ abstract public function flush( $id ); } ?>