We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 442652a commit 3847666Copy full SHA for 3847666
1 file changed
README.md
@@ -144,8 +144,12 @@ The expectation is that you use _either_ `clojure.core.cache` _or_
144
145
;=> 1
146
147
- ;; unique to the wrapped API:
+ ;; unique to the wrapped API, this combines through-cache and lookup
148
+ ;; to return the looked up value, possibly after calling the passed in
149
+ ;; function with the key to populate the cache if the key wasn't present:
150
(w/lookup-or-miss C3 :b (constantly 42))
151
+ ;; calls (jdbc/get-by-id :storage my-key) in the event of a cache miss:
152
+ (w/lookup-or-miss C3 my-key (partial jdbc/get-by-id db-spec :storage))
153
154
;=> 42
155
0 commit comments