* makes the `entry` the freshEnd of the LRU linked list
(entry)
| 5986 | * makes the `entry` the freshEnd of the LRU linked list |
| 5987 | */ |
| 5988 | function refresh(entry) { |
| 5989 | if (entry != freshEnd) { |
| 5990 | if (!staleEnd) { |
| 5991 | staleEnd = entry; |
| 5992 | } else if (staleEnd == entry) { |
| 5993 | staleEnd = entry.n; |
| 5994 | } |
| 5995 | |
| 5996 | link(entry.n, entry.p); |
| 5997 | link(entry, freshEnd); |
| 5998 | freshEnd = entry; |
| 5999 | freshEnd.n = null; |
| 6000 | } |
| 6001 | } |
| 6002 | |
| 6003 | |
| 6004 | /** |