Return a data cache.
public getDataCache ( array $data_params ) : Horde_Kolab_Storage_Cache_Data | ||
$data_params | array | Return the data cache for a data set with these parameters. |
return | Horde_Kolab_Storage_Cache_Data | The data cache. |
private function _getQuery($data) { $cache = new Horde_Kolab_Storage_Cache($this->_cache); $data_cache = $cache->getDataCache($data->getIdParameters()); $params = array('cache' => $data_cache); return new Horde_Kolab_Storage_Data_Query_Preferences_Cache($data, $params); }
/** * Constructor. * * @param Horde_Kolab_Storage_Folder $folder The folder to retrieve the * data from. * @param Horde_Kolab_Storage_Driver $driver The primary connection driver. * @param Horde_Kolab_Storage_Factory $factory The factory. * @param Horde_Kolab_Storage_Cache $cache The cache storing data for * this decorator. * @param string $type The type of data we want to * access in the folder. * @param int $version Format version of the object * data. */ public function __construct(Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Driver $driver, Horde_Kolab_Storage_Factory $factory, Horde_Kolab_Storage_Cache $cache, $type = null, $version = 1) { parent::__construct($folder, $driver, $factory, $type, $version); $this->_data_cache = $cache->getDataCache($this->getIdParameters()); }
/** * Fetch any additional parameters required when creating data queries. * * @param Horde_Kolab_Storage_Data $data The data. * * @return array The parameters for data queries. */ protected function _getDataQueryParameters(Horde_Kolab_Storage_Data $data) { return array('cache' => $this->_cache->getDataCache($data->getIdParameters())); }