Makes a weak-cache-factory available. Entries will be eagerly collected by the jvm, rather than only when there's memory pressure. Implementation is fairly simple. I changed SoftCache to NonStrongCache and added an extra record parameter, which is the function used to create the reference. See https://github.com/pnf/core.cache/compare/clojure:master...master
Environment
None
Activity
Sean Corfield
March 1, 2018 at 9:35 AM
This looks interesting. For backward compatibility reasons, I would not want to change any of the public names, but I'd be open to a patch that is purely additive to add the NonStrongCache and reimplement SoftCache in terms of it, as well as adding the WeakCache.
Makes a weak-cache-factory available. Entries will be eagerly collected by the jvm, rather than only when there's memory pressure.
Implementation is fairly simple. I changed SoftCache to NonStrongCache and added an extra record parameter, which is the function
used to create the reference.
See https://github.com/pnf/core.cache/compare/clojure:master...master