* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 5589 | * makes the `entry` the freshEnd of the LRU linked list |
| 5590 | */ |
| 5591 | function refresh(entry) { |
| 5592 | if (entry != freshEnd) { |
| 5593 | if (!staleEnd) { |
| 5594 | staleEnd = entry; |
| 5595 | } else if (staleEnd == entry) { |
| 5596 | staleEnd = entry.n; |
| 5597 | } |
| 5598 | |
| 5599 | link(entry.n, entry.p); |
| 5600 | link(entry, freshEnd); |
| 5601 | freshEnd = entry; |
| 5602 | freshEnd.n = null; |
| 5603 | } |
| 5604 | } |
| 5605 | |
| 5606 | |
| 5607 | /** |