public function exists($gid)
{
// Check list cache.
if (($list = $this->_getListCache()) !== null && isset($list[$gid])) {
return true;
}
// Check "exists" cache.
if (is_bool($exists = $this->_checkExistsCache($gid))) {
return $exists;
}
// Existance check.
$exists = $this->_exists($gid);
// Update "exists" cache.
try {
$this->_cache->set($this->_sig('exists_' . $gid), (int) $exists);
} catch (Horde_Cache_Exception $e) {
}
return $exists;
}