* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 6104 | * makes the `entry` the freshEnd of the LRU linked list |
| 6105 | */ |
| 6106 | function refresh(entry) { |
| 6107 | if (entry != freshEnd) { |
| 6108 | if (!staleEnd) { |
| 6109 | staleEnd = entry; |
| 6110 | } else if (staleEnd == entry) { |
| 6111 | staleEnd = entry.n; |
| 6112 | } |
| 6113 | |
| 6114 | link(entry.n, entry.p); |
| 6115 | link(entry, freshEnd); |
| 6116 | freshEnd = entry; |
| 6117 | freshEnd.n = null; |
| 6118 | } |
| 6119 | } |
| 6120 | |
| 6121 | |
| 6122 | /** |