* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 3470 | * makes the `entry` the freshEnd of the LRU linked list |
| 3471 | */ |
| 3472 | function refresh(entry) { |
| 3473 | if (entry != freshEnd) { |
| 3474 | if (!staleEnd) { |
| 3475 | staleEnd = entry; |
| 3476 | } else if (staleEnd == entry) { |
| 3477 | staleEnd = entry.n; |
| 3478 | } |
| 3479 | |
| 3480 | link(entry.n, entry.p); |
| 3481 | link(entry, freshEnd); |
| 3482 | freshEnd = entry; |
| 3483 | freshEnd.n = null; |
| 3484 | } |
| 3485 | } |
| 3486 | |
| 3487 | |
| 3488 | /** |