* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 7205 | * makes the `entry` the freshEnd of the LRU linked list |
| 7206 | */ |
| 7207 | function refresh(entry) { |
| 7208 | if (entry !== freshEnd) { |
| 7209 | if (!staleEnd) { |
| 7210 | staleEnd = entry; |
| 7211 | } else if (staleEnd === entry) { |
| 7212 | staleEnd = entry.n; |
| 7213 | } |
| 7214 | |
| 7215 | link(entry.n, entry.p); |
| 7216 | link(entry, freshEnd); |
| 7217 | freshEnd = entry; |
| 7218 | freshEnd.n = null; |
| 7219 | } |
| 7220 | } |
| 7221 | |
| 7222 | |
| 7223 | /** |