Horde_Kolab_Storage_Cache_Data::hasQuery PHP Method

hasQuery() public method

Is the specified query data available in the cache?
public hasQuery ( string $key ) : boolean
$key string The query key.
return boolean True in case cached data is available.
    public function hasQuery($key)
    {
        $this->_load();
        return isset($this->_data[self::QUERIES][$key]);
    }

Usage Example

Example #1
0
 /**
  * Ensure we have the query data.
  *
  * @return NULL
  */
 private function _init()
 {
     if ($this->_mapping !== null) {
         return;
     }
     if ($this->_data_cache->hasQuery(self::PREFS)) {
         $this->_mapping = $this->_data_cache->getQuery(self::PREFS);
     } else {
         $this->synchronize();
     }
 }