Skip to content

Commit 05f7ac4

Browse files
committed
prep for 1.2.281
Signed-off-by: Sean Corfield <sean@corfield.org>
1 parent af539b1 commit 05f7ac4

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ Developer Information
8585
Change 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

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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"}}}

src/main/clojure/clojure/core/memoize.clj

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,13 @@
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?))
@@ -438,6 +437,16 @@
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

0 commit comments

Comments
 (0)