Comment made by: seancorfield
It took me a while to find this suggested usage -- https://github.com/clojure/core.cache/wiki/Using
I should update that to use {{through-cache}} which is more idiomatic now:
(defn get-data [key]
(cache/lookup (swap! cache-store cache/through-cache key retrieve-data) key))
It would still suffer from the same possibility of Cache Stampede but at least it would be consistent with the newer API.
I suspect using a local {{delay}} would mitigate the stampede issue but it would make for very ugly code and it would not play well with {{through-cache}} -- so I'll have to give that some thought.