public function remove($key) {
       if (!isset($this->hashmap[$key])) { return false; }
       $nodeToRemove = $this->hashmap[$key];
       $this->detach($nodeToRemove);
       unset($this->hashmap[$nodeToRemove->getKey()]);
       return true;
     }
public function remove($key) {
       if (!isset($this->hashmap[$key])) { return false; }
       $nodeToRemove = $this->hashmap[$key];
       $this->detach($nodeToRemove);
       unset($this->hashmap[$nodeToRemove->getKey()]);
       return true;
     }
public function remove ( $ key ) { if ( ! isset ( $ this -> hashmap [ $ key ] ) ) { return false ; } $ nodeToRemove = $ this -> hashmap [ $ key ] ; $ this -> detach ( $ nodeToRemove ) ; unset ( $ this -> hashmap [ $ nodeToRemove -> getKey ( ) ] ) ; return true ; }
Removes a key from the cache
@param string $key key to remove
@return bool true if removed, false if not found
Removes a key from the cache