public function get($key)
    {
        $k = $this->hash($key);
        if (!isset($this->cache[$k])) {
            return null;
        }
        $item = $this->cache[$k];
        if (isset($item->expire)) {
            if (microtime(true) >= $item->expire) {
                unset($this->cache[$k]);
                return null;
            }
        }
        return $item;
    }
public function get($key)
    {
        $k = $this->hash($key);
        if (!isset($this->cache[$k])) {
            return null;
        }
        $item = $this->cache[$k];
        if (isset($item->expire)) {
            if (microtime(true) >= $item->expire) {
                unset($this->cache[$k]);
                return null;
            }
        }
        return $item;
    }
public function get ( $ key ) { $ k = $ this -> hash ( $ key ) ; if ( ! isset ( $ this -> cache [ $ k ] ) ) { return null ; } $ item = $ this -> cache [ $ k ] ; if ( isset ( $ item -> expire ) ) { if ( microtime ( true ) >= $ item -> expire ) { unset ( $ this -> cache [ $ k ] ) ; return null ; } } return $ item ; }
Gets element by key
@param  string $key Key
@return object Item
Gets element by key