Skip to content

Commit 803d1c0

Browse files
committed
move JDBC example after showing C3 contents
1 parent 3847666 commit 803d1c0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,15 @@ The expectation is that you use _either_ `clojure.core.cache` _or_
148148
;; to return the looked up value, possibly after calling the passed in
149149
;; function with the key to populate the cache if the key wasn't present:
150150
(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))
153151

154152
;=> 42
155153

156154
@C3
157155

158156
;=> {:a 1, :d 13, :b 42}
157+
158+
;; calls (jdbc/get-by-id :storage my-key) in the event of a cache miss:
159+
(w/lookup-or-miss C3 my-key (partial jdbc/get-by-id db-spec :storage))
159160
```
160161

161162
Refer to docstrings in the `clojure.core.cache` or `clojure.core.cache.wrapped` namespaces, or the [autogenerated API documentation](http://clojure.github.io/core.cache/) for additional documentation.

0 commit comments

Comments
 (0)