public function cached($key) {
        global $USER;
        $this->ensure_session_cache_initialised();
        if (!array_key_exists($key, $this->session) || !is_array($this->session[$key]) || $this->session[$key][self::CACHEUSERID]!=$USER->id || $this->session[$key][self::CACHETIME] < $this->timeout) {
            return false;
        }
        return true;
    }
public function cached($key) {
        global $USER;
        $this->ensure_session_cache_initialised();
        if (!array_key_exists($key, $this->session) || !is_array($this->session[$key]) || $this->session[$key][self::CACHEUSERID]!=$USER->id || $this->session[$key][self::CACHETIME] < $this->timeout) {
            return false;
        }
        return true;
    }
public function cached ( $ key ) { global $ USER ; $ this -> ensure_session_cache_initialised ( ) ; if ( ! array_key_exists ( $ key , $ this -> session ) || ! is_array ( $ this -> session [ $ key ] ) || $ this -> session [ $ key ] [ self :: CACHEUSERID ] != $ USER -> id || $ this -> session [ $ key ] [ self :: CACHETIME ] < $ this -> timeout ) { return false ; } return true ; }
Check the existence of the identifier in the cache

@param string|int $key
@return bool
Check the existence of the identifier in the cache