When attempting to force re-render of a single post by deleting the corresponding pre-template.html file from the cache, the post is not correctly detected as stale, resulting in a file error when trying to load the post from the cache:
: jmglov.net; rm .cache/2022-06-15-summertime.md.pre-template.html
: jmglov.net; bb quickblog render
Reading post from cache: 2022-06-15-summertime.md
----- Error --------------------------------------------------------------------
Type: java.io.FileNotFoundException
Message: .cache/2022-06-15-summertime.md.pre-template.html (No such file or directory)
Location: /home/jmglov/Documents/code/clojure/quickblog/src/quickblog/internal.clj:162:7
----- Context ------------------------------------------------------------------
158: (defn read-cached-post [{:keys [cache-dir]} file]
159: (let [cached-file (fs/file cache-dir (cache-file file))]
160: (delay
161: (println "Reading post from cache:" (str file))
162: (slurp cached-file))))
^--- .cache/2022-06-15-summertime.md.pre-template.html (No such file or directory)
163:
164: (defn load-post [{:keys [cache-dir default-metadata
165: force-render rendering-system-files]
166: :as opts}
167: path]
When attempting to force re-render of a single post by deleting the corresponding
pre-template.html
file from the cache, the post is not correctly detected as stale, resulting in a file error when trying to load the post from the cache: