Add weak-cache

Description

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.

Details

Assignee

Reporter

Patch

Priority

Created August 24, 2014 at 2:52 PM
Updated June 9, 2019 at 1:13 AM