* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 7140 | * makes the `entry` the freshEnd of the LRU linked list |
| 7141 | */ |
| 7142 | function refresh(entry) { |
| 7143 | if (entry !== freshEnd) { |
| 7144 | if (!staleEnd) { |
| 7145 | staleEnd = entry; |
| 7146 | } else if (staleEnd === entry) { |
| 7147 | staleEnd = entry.n; |
| 7148 | } |
| 7149 | |
| 7150 | link(entry.n, entry.p); |
| 7151 | link(entry, freshEnd); |
| 7152 | freshEnd = entry; |
| 7153 | freshEnd.n = null; |
| 7154 | } |
| 7155 | } |
| 7156 | |
| 7157 | |
| 7158 | /** |