public function get(string $key)
    {
        if ($this->enabled === false) {
            return null;
        }

        $index = $this->cacheIndex[$key] ?? $key;
        if (!isset($this->cache[$index]) || $this->cacheExpiryTime[$index] < microtime(true)) {
            return null;
        }

        ++$this->cacheAccessCount[$index];

        return $this->cache[$index];
    }
public function get(string $key)
    {
        if ($this->enabled === false) {
            return null;
        }

        $index = $this->cacheIndex[$key] ?? $key;
        if (!isset($this->cache[$index]) || $this->cacheExpiryTime[$index] < microtime(true)) {
            return null;
        }

        ++$this->cacheAccessCount[$index];

        return $this->cache[$index];
    }
public function get ( string $ key ) { if ( $ this -> enabled === false ) { return null ; } $ index = $ this -> cacheIndex [ $ key ] ?? $ key ; if ( ! isset ( $ this -> cache [ $ index ] ) || $ this -> cacheExpiryTime [ $ index ] < microtime ( true ) ) { return null ; } ++ $ this -> cacheAccessCount [ $ index ] ; return $ this -> cache [ $ index ] ; }
Returns a cache objects.

@param string $key Primary or secondary index to look for cache on.

@return object|null Object if found, null if not.
Returns a cache objects .