* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 7081 | * makes the `entry` the freshEnd of the LRU linked list |
| 7082 | */ |
| 7083 | function refresh(entry) { |
| 7084 | if (entry !== freshEnd) { |
| 7085 | if (!staleEnd) { |
| 7086 | staleEnd = entry; |
| 7087 | } else if (staleEnd === entry) { |
| 7088 | staleEnd = entry.n; |
| 7089 | } |
| 7090 | |
| 7091 | link(entry.n, entry.p); |
| 7092 | link(entry, freshEnd); |
| 7093 | freshEnd = entry; |
| 7094 | freshEnd.n = null; |
| 7095 | } |
| 7096 | } |
| 7097 | |
| 7098 | |
| 7099 | /** |