evict(node) {
    delete this.nodesMap[node.key];
    this.size -= 1;

    const prevNode = node.prev;
    const nextNode = node.next;

    // If one and only node.
    if (prevNode === this.head && nextNode === this.tail) {
      this.head.next = null;
      this.tail.prev = null;
      this.size = 0;
      return;
    }

    // If this is a Head node.
    if (prevNode === this.head) {
      nextNode.prev = this.head;
      this.head.next = nextNode;
      return;
    }

    // If this is a Tail node.
    if (nextNode === this.tail) {
      prevNode.next = this.tail;
      this.tail.prev = prevNode;
      return;
    }

    // If the node is in the middle.
    prevNode.next = nextNode;
    nextNode.prev = prevNode;
  }
Evicts (removes) the node from cache linked list.
@param {LinkedListNode} node