public function get(string $key)
    {
        $key = $this->hashKey($key);
        if (\array_key_exists($key, $this->cache)) {
            $this->hits++;
            return $this->cache[$key];
        }
        $this->misses++;
        return null;
    }
public function get(string $key)
    {
        $key = $this->hashKey($key);
        if (\array_key_exists($key, $this->cache)) {
            $this->hits++;
            return $this->cache[$key];
        }
        $this->misses++;
        return null;
    }
public function get ( string $ key ) { $ key = $ this -> hashKey ( $ key ) ; if ( \ array_key_exists ( $ key , $ this -> cache ) ) { $ this -> hits ++ ; return $ this -> cache [ $ key ] ; } $ this -> misses ++ ; return null ; }
Retrieve an item from the cache.
@param $key string
@return mixed
Retrieve an item from the cache .