return new value that was added to the cache
i thought swap! was supposed to return this value by itself?
This commit is contained in:
parent
5fc46d12e9
commit
e50fb349c3
|
@ -15,8 +15,10 @@
|
||||||
(let [cached-post (get @post-md-cache _id)]
|
(let [cached-post (get @post-md-cache _id)]
|
||||||
(if (or (not cached-post)
|
(if (or (not cached-post)
|
||||||
(after? created_at (:created_at cached-post)))
|
(after? created_at (:created_at cached-post)))
|
||||||
(swap! post-md-cache assoc _id {:created_at created_at
|
(do
|
||||||
:html_body (md->html body)})
|
(swap! post-md-cache assoc _id {:created_at created_at
|
||||||
|
:html_body (md->html body)})
|
||||||
|
(get @post-md-cache _id))
|
||||||
cached-post)))
|
cached-post)))
|
||||||
|
|
||||||
(defn- merge-cached-post-md! [post]
|
(defn- merge-cached-post-md! [post]
|
||||||
|
|
Reference in a new issue