* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 6648 | * makes the `entry` the freshEnd of the LRU linked list |
| 6649 | */ |
| 6650 | function refresh(entry) { |
| 6651 | if (entry !== freshEnd) { |
| 6652 | if (!staleEnd) { |
| 6653 | staleEnd = entry; |
| 6654 | } else if (staleEnd === entry) { |
| 6655 | staleEnd = entry.n; |
| 6656 | } |
| 6657 | |
| 6658 | link(entry.n, entry.p); |
| 6659 | link(entry, freshEnd); |
| 6660 | freshEnd = entry; |
| 6661 | freshEnd.n = null; |
| 6662 | } |
| 6663 | } |
| 6664 | |
| 6665 | |
| 6666 | /** |