I've been trying to wrap my head around core.cache, and it seems to me that the suggest use in the documentation, i.e.
will result in a Cache Stampede since (retrieve-data key) might be called multiple times if swap! retries due to compare-and-swap misses. Unfortunately I don't have a suggestion on how this could be fixed.
Environment
None
Activity
Sean Corfield
November 1, 2019 at 4:51 PM
Released/addressed in 0.8.0 through 0.8.2 (0.8.0 and 0.8.1 both had bugs in the wrapped API that are fixed in 0.8.2).
Sean Corfield
August 24, 2019 at 10:34 PM
Addition of clojure.core.cache.wrapped with comparable API plus lookup-or-miss to provide stampede-free version of this functionality for caches wrapped in atoms.
I've been trying to wrap my head around core.cache, and it seems to me that the suggest use in the documentation, i.e.
will result in a Cache Stampede since
(retrieve-data key)
might be called multiple times ifswap!
retries due to compare-and-swap misses. Unfortunately I don't have a suggestion on how this could be fixed.