/**
* Fetch an object from cache.
*
* @param string
* The cache key of the object
*
* @return mixed
* The unserialized data.
*/
public function fetch($p_key)
{
if (!self::$m_enabled) {
return false;
}
self::$m_fetchRequests++;
$serial = $this->m_cacheEngine->fetchValue($this->genKey($p_key));
if ($serial !== false) {
self::$m_hits++;
} else {
if (!isset(self::$m_missKeys[$p_key])) {
self::$m_missKeys[$p_key] = 1;
} else {
self::$m_missKeys[$p_key]++;
}
return false;
}
return $this->unserialize($serial);
}