original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Check the existence of the identifier in the cache
  
  @param string|int $key
  @return bool
docstring_tokens: Check the existence of the identifier in the cache