* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 6363 | * makes the `entry` the freshEnd of the LRU linked list |
| 6364 | */ |
| 6365 | function refresh(entry) { |
| 6366 | if (entry != freshEnd) { |
| 6367 | if (!staleEnd) { |
| 6368 | staleEnd = entry; |
| 6369 | } else if (staleEnd == entry) { |
| 6370 | staleEnd = entry.n; |
| 6371 | } |
| 6372 | |
| 6373 | link(entry.n, entry.p); |
| 6374 | link(entry, freshEnd); |
| 6375 | freshEnd = entry; |
| 6376 | freshEnd.n = null; |
| 6377 | } |
| 6378 | } |
| 6379 | |
| 6380 | |
| 6381 | /** |