* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 5648 | * makes the `entry` the freshEnd of the LRU linked list |
| 5649 | */ |
| 5650 | function refresh(entry) { |
| 5651 | if (entry != freshEnd) { |
| 5652 | if (!staleEnd) { |
| 5653 | staleEnd = entry; |
| 5654 | } else if (staleEnd == entry) { |
| 5655 | staleEnd = entry.n; |
| 5656 | } |
| 5657 | |
| 5658 | link(entry.n, entry.p); |
| 5659 | link(entry, freshEnd); |
| 5660 | freshEnd = entry; |
| 5661 | freshEnd.n = null; |
| 5662 | } |
| 5663 | } |
| 5664 | |
| 5665 | |
| 5666 | /** |