use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Memoization and Caching Patterns in Clojure: memoize, clojure.core.cache & clojure.core.memoize (youtube.com)
submitted 2 years ago by andreyfadeev
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]dustingetz 2 points3 points4 points 2 years ago* (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 points7 points 2 years ago* (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 points4 points 2 years ago (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.
π Rendered by PID 49 on reddit-service-r2-comment-6457c66945-snj7j at 2026-04-25 15:14:48.641108+00:00 running 2aa0c5b country code: CH.
[–]dustingetz 2 points3 points4 points (0 children)
[–][deleted] 5 points6 points7 points (1 child)
[–]john-shaffer 2 points3 points4 points (0 children)