lru
lru copied to clipboard
Query about interface (possible misunderstanding of semantics)
Great library!
If I have an entry k->v, and I want to change it to k->v', is there a way to do this without altering the "least recently used" information? (Does this question make sense?)
I think I want something like the "add" function, but where the k->v' binding is not necessarily the "most recently used".
Looking at the implementation, and also at psq, I think I want a function like psq's "adjust".
I should add that in my application, all v have weight 1. So replacing k->v with k-> v' doesn't need to adjust weights or anything like that.