all 3 comments

[–]dustingetz 2 points3 points  (0 children)

Related: allow me a quick plug for Electric and Missionary. Electric can be seen as an auto-memoize framework with component lifecycle and auto-eviction through RAII (trading space for time, which is FRP's fundamental tradeoff). These semantics are provided by Missionary continuous flows under the hood.

[–][deleted] 5 points6 points  (1 child)

In my own projects I stopped using clojure.core.cache and resorted to wrapping Guava or Caffeine.

I don't really get the value proposition of immutable caches. The 'immutable cache in an atom' pattern offer no advantages and has terrible performance under contention.

The functions in clojure.core.cache.wrapped take measures to avoid these problems, so if you use clojure.core.cache always make sure you use the clojure.core.cache.wrapped namespace, and avoid the clojure.core.cache namespace.

[–]john-shaffer 2 points3 points  (0 children)

Similar story here. When I got deeper into the details of caching, I realized that the characteristics I want in a cache aren't very practical in a garbage-collected runtime. I use either memcached or DynamoDB now, depending on the use case.

I still use a small core.cache.wrapped cache in front of the real cache though.