* Moves an existing node to the head position (marks as most recently used). * This is the core LRU operation - accessed items become most recent.
(node: LRUNode<T>)
| 98 | * This is the core LRU operation - accessed items become most recent. |
| 99 | */ |
| 100 | private moveToHead(node: LRUNode<T>): void { |
| 101 | this.removeNode(node) |
| 102 | this.addToHead(node) |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Removes and returns the least recently used node (the one before tail). |
no test coverage detected