* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 7023 | * makes the `entry` the freshEnd of the LRU linked list |
| 7024 | */ |
| 7025 | function refresh(entry) { |
| 7026 | if (entry !== freshEnd) { |
| 7027 | if (!staleEnd) { |
| 7028 | staleEnd = entry; |
| 7029 | } else if (staleEnd === entry) { |
| 7030 | staleEnd = entry.n; |
| 7031 | } |
| 7032 | |
| 7033 | link(entry.n, entry.p); |
| 7034 | link(entry, freshEnd); |
| 7035 | freshEnd = entry; |
| 7036 | freshEnd.n = null; |
| 7037 | } |
| 7038 | } |
| 7039 | |
| 7040 | |
| 7041 | /** |