original_string: public function compare($key, $value, $serialise = true) {
          if ($this->cached($key)) {
              if ($serialise) {
                  $value = serialize($value);
              }
              if ($this->session[$key][self::CACHEVALUE] === $value) {
                  return true;
              }
          }
          return false;
      }
code: public function compare($key, $value, $serialise = true) {
          if ($this->cached($key)) {
              if ($serialise) {
                  $value = serialize($value);
              }
              if ($this->session[$key][self::CACHEVALUE] === $value) {
                  return true;
              }
          }
          return false;
      }
code_tokens: public function compare ( $ key , $ value , $ serialise = true ) { if ( $ this -> cached ( $ key ) ) { if ( $ serialise ) { $ value = serialize ( $ value ) ; } if ( $ this -> session [ $ key ] [ self :: CACHEVALUE ] === $ value ) { return true ; } } return false ; }
docstring: Compare something to it's equivilant in the cache
  
  @param string $key
  @param mixed $value
  @param bool $serialise Whether to serialise the value before comparison
  this should only be set to false if the value is already
  serialised
  @return bool If the value is the same false if it is not set or doesn't match
docstring_tokens: Compare something to it s equivilant in the cache