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

Show:
Sean Corfield
March 1, 2018, 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.

Assignee

Sean Corfield

Reporter

import

Labels

None

Approval

None

Patch

Code and Test

Priority

Minor