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)]
|
||||
(if (or (not cached-post)
|
||||
(after? created_at (:created_at cached-post)))
|
||||
(do
|
||||
(swap! post-md-cache assoc _id {:created_at created_at
|
||||
:html_body (md->html body)})
|
||||
(get @post-md-cache _id))
|
||||
cached-post)))
|
||||
|
||||
(defn- merge-cached-post-md! [post]
|
||||
|
|
Reference in a new issue