However, this will not update the "recently used"-ness. (or will it?)
I am sure there is a way to update that, but I think its easier for all to add it to lru-Cache, as I expect it to be quite common, that one wants to find an element not based on the key.
Hi, I currently have a use-case where I need to find a value in the lru-cache without a key.
simple example: key: 111, { someId: 111, name: "whatImLookingFor"}
Currently I have to do something like:
lru.values().find(el => el.name === "whatImLookingFor")
However, this will not update the "recently used"-ness. (or will it?)
I am sure there is a way to update that, but I think its easier for all to add it to lru-Cache, as I expect it to be quite common, that one wants to find an element not based on the key.