* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 5054 | * makes the `entry` the freshEnd of the LRU linked list |
| 5055 | */ |
| 5056 | function refresh(entry) { |
| 5057 | if (entry != freshEnd) { |
| 5058 | if (!staleEnd) { |
| 5059 | staleEnd = entry; |
| 5060 | } else if (staleEnd == entry) { |
| 5061 | staleEnd = entry.n; |
| 5062 | } |
| 5063 | |
| 5064 | link(entry.n, entry.p); |
| 5065 | link(entry, freshEnd); |
| 5066 | freshEnd = entry; |
| 5067 | freshEnd.n = null; |
| 5068 | } |
| 5069 | } |
| 5070 | |
| 5071 | |
| 5072 | /** |