CampCache::fetch PHP Method

fetch() public method

Fetch an object from cache.
public fetch ( $p_key ) : mixed
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);
    }