pqwy / lru Goto Github PK
View Code? Open in Web Editor NEWScalable LRU caches for OCaml
License: ISC License
Scalable LRU caches for OCaml
License: ISC License
Adding a bindings k -> v to kvs means List.remove_assoc k kvs @ [(k, v)]
I think the (k,v) that has been added should come at the front? At least the following doc has:
Promoting a binding k -> v means removing, and then re-adding it.
So, presumably re-adding moves the binding to the front?
Calling trim
after add
-ing an element, instead of requiring the user to call trim
makes sense to me.
Was there a reason trim
wasn't part of add
? If not, I can try adding it.
You know the rule, if it's not in opam it doesn't exist :-)
and it's just a topkg tag && topkg bistro
away anyway.
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".
I would like to be able to access an element of a mutable LRU without promoting it.
Something like LRU.M.S.peek key lru
, returning a value option without changing the existing order.
A related need I have is to be notified of dropped values, although I don't know what the best API would be for that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.