* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 6403 | * makes the `entry` the freshEnd of the LRU linked list |
| 6404 | */ |
| 6405 | function refresh(entry) { |
| 6406 | if (entry != freshEnd) { |
| 6407 | if (!staleEnd) { |
| 6408 | staleEnd = entry; |
| 6409 | } else if (staleEnd == entry) { |
| 6410 | staleEnd = entry.n; |
| 6411 | } |
| 6412 | |
| 6413 | link(entry.n, entry.p); |
| 6414 | link(entry, freshEnd); |
| 6415 | freshEnd = entry; |
| 6416 | freshEnd.n = null; |
| 6417 | } |
| 6418 | } |
| 6419 | |
| 6420 | |
| 6421 | /** |