Horde_Kolab_Storage_Cache::getDataCache PHP Method

getDataCache() public method

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.
    public function getDataCache($data_params)
    {
        $data_id = $this->_getDataId($data_params);
        if (!isset($this->_data_caches[$data_id])) {
            $this->_data_caches[$data_id] = new Horde_Kolab_Storage_Cache_Data($this, $data_params);
            $this->_data_caches[$data_id]->setDataId($data_id);
        }
        return $this->_data_caches[$data_id];
    }

Usage Example

コード例 #1
0
ファイル: CacheTest.php プロジェクト: raz0rsdge/horde
 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);
 }
All Usage Examples Of Horde_Kolab_Storage_Cache::getDataCache