public function exists($key) {
        if (!array_key_exists($key, $this->storage))
            return false;

        if ($this->storage[$key]['expires'] > 0 && time() > $this->storage[$key]['expires'])
            return false;

        return true;
    }
public function exists($key) {
        if (!array_key_exists($key, $this->storage))
            return false;

        if ($this->storage[$key]['expires'] > 0 && time() > $this->storage[$key]['expires'])
            return false;

        return true;
    }
public function exists ( $ key ) { if ( ! array_key_exists ( $ key , $ this -> storage ) ) return false ; if ( $ this -> storage [ $ key ] [ 'expires' ] > 0 && time ( ) > $ this -> storage [ $ key ] [ 'expires' ] ) return false ; return true ; }
Checks if data exists in cache
@param $key
@return bool|string[]
Checks if data exists in cache