public function getName($gid)
{
// Check list cache.
if (($list = $this->_getListCache()) !== null) {
if (!isset($list[$gid])) {
throw new Horde_Exception_NotFound();
}
return $list[$gid];
}
// Check "exists" cache.
if ($this->_checkExistsCache($gid) === false) {
throw new Horde_Exception_NotFound();
}
// Check name cache.
$sig = $this->_sig('name_' . $gid);
try {
if ($name = $this->_cache->get($sig, 0)) {
return $name;
}
} catch (Horde_Cache_Exception $e) {
}
// Retrieve name.
$name = $this->_getName($gid);
// Update name cache.
try {
$this->_cache->set($sig, $name);
} catch (Horde_Cache_Exception $e) {
}
return $name;
}