Skip to content

Commit

Permalink
Clarify "at most once" guarantee is per-invocation of lookup-or-miss
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield authored Aug 5, 2024
1 parent 99fbd66 commit fb4ef58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/clojure/clojure/core/cache/wrapped.clj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
value (using value-fn, and optionally wrap-fn), update the cache for `e`
and then perform the lookup again.
For any given invocation of lookup-or-miss, it is guaranteed that
value-fn (and wrap-fn) will only be called (at most) once even in the
case of retries, so there is no risk of cache stampede.
Expand Down

0 comments on commit fb4ef58

Please sign in to comment.