File tree Expand file tree Collapse file tree 3 files changed +20
-9
lines changed
src/main/clojure/clojure/core Expand file tree Collapse file tree 3 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ Developer Information
8585Change Log
8686====================
8787
88+ * Release 1.2.281 on 2026.02.25
89+ * Update ` core.cache ` dep
8890* Release 1.2.278 on 2026.02.22
8991 * Update ` core.cache ` dep
9092 * Add clj-kondo support
Original file line number Diff line number Diff line change 33; ; against: :1.9 :1.10 :1.11 :1.12
44
55{:paths [" src/main/clojure" " resources" ]
6- :deps {org.clojure/core.cache {:mvn/version " 1.2.254 " }}
6+ :deps {org.clojure/core.cache {:mvn/version " 1.2.263 " }}
77 :aliases {:1.9 {:override-deps {org.clojure/clojure {:mvn/version " 1.9.0" }}}
88 :1.10 {:override-deps {org.clojure/clojure {:mvn/version " 1.10.3" }}}
99 :1.11 {:override-deps {org.clojure/clojure {:mvn/version " 1.11.4" }}}
Original file line number Diff line number Diff line change 4242 ; ; second check (race condition with locking)
4343 (if available?
4444 value
45- (do
46- ; ; fun may throw - will retry on next deref
47- (let [v (fun )]
48- ; ; this ordering is important - MUST set value before setting available?
49- ; ; or you have a race with the first check above
50- (set! value v)
51- (set! available? true )
52- v))))))
45+ ; ; fun may throw - will retry on next deref
46+ (let [v (fun )]
47+ ; ; this ordering is important - MUST set value before setting available?
48+ ; ; or you have a race with the first check above
49+ (set! value v)
50+ (set! available? true )
51+ v)))))
5352 clojure.lang.IPending
5453 (isRealized [this]
5554 available?))
438437 (check-args " lru" f base key threshold)
439438 (memoizer f (cache/lru-cache-factory {} :threshold threshold) base)))
440439
440+ (comment
441+ (def counter (atom 0 ))
442+ (defn f [x] (println x) (throw (ex-info " error" {:c (swap! counter inc) :x x})))
443+ (f {:a 1 :b 2 })
444+ (def f ' (lru (with-meta f {::args-fn (fn [args] (:a (first args)))})))
445+ (meta f')
446+ (try (f' {:a " A" :b 1 }) (catch Exception e (ex-data e)))
447+ (try (f' {:a " A" :b 3 }) (catch Exception e (ex-data e)))
448+ )
449+
441450; ; ### TTL
442451
443452(def-deprecated ttl
You can’t perform that action at this time.
0 commit comments