Skip to content

Commit fb4ef58

Browse files
authored
Clarify "at most once" guarantee is per-invocation of lookup-or-miss
1 parent 99fbd66 commit fb4ef58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/clojure/clojure/core/cache/wrapped.clj

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
value (using value-fn, and optionally wrap-fn), update the cache for `e`
4141
and then perform the lookup again.
4242
43+
For any given invocation of lookup-or-miss, it is guaranteed that
4344
value-fn (and wrap-fn) will only be called (at most) once even in the
4445
case of retries, so there is no risk of cache stampede.
4546

0 commit comments

Comments
 (0)