Commit 1001773c authored by Bruno Burke's avatar Bruno Burke 🍔
Browse files
parents 70c2ed2f 77dd2380
Pipeline #32835 passed with stages
in 1 minute and 37 seconds
(defproject document-storage ""
(defproject document-storage ""
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
......@@ -98,16 +98,13 @@
(defn load-document [id & {:keys [repository] :or {repository default-repository}}]
(let [cached-repository (cached-repository? repository)]
(when cached-repository
(get-in @cache [repository :documents id]))
(and cached-repository (get-in @cache [repository :documents id]))
(when (valid-id? id repository)
(let [result (read-string (slurp (get-file-path id repository)))]
(if cached-repository
(cache-document repository id result)
(defn save-document [id document & {:keys [repository] :or {repository default-repository}}]
(let [file-path (get-file-path id repository)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment