On Feb 1, 7:01 pm, Bill Caputo <logos...@gmail.com> wrote:
> We are looking to add soft-reference based caching to one of our applications 
> and I was wondering if anyone could shed light on what the issues with 
> clache's implementation were (i.e. is a total loss, or would it potentially 
> be a good place for us to start, and so perhaps implement something that 
> could be submitted back).

I know nothing about core.cache's implementation, but I'd warn against
relying on soft references for caching. I've seen out-of-memory
exceptions due to this under heavy loads in one of our server
applications.

The promise of soft references is tempting: utilize spare memory yet
allow it to be released when memory runs out. In practice some GC
algorithms seem to have trouble working quickly enough and may keep
soft references alive too long, allowing out-of-memory situations to
occur -- despite promises to the contrary.

You situation will of course be different but I'd suggest good stress
testing with your chosen VM and GC if you do this.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to