Say I do some parsing to generate a dataset. The job can be pretty slow, so is the loading of my webpage that is displaying the dataset.
Is there a way to tell the server to parse say every minute, to cache this and to rely on the cache to display results.
I've taken a look at core.cache and its docs but I can't figure out a simple way to just do that:
(require '[clojure.core.cache :as cache])
(def Dataset
(atom
(-> (parse-fn "http://nytimes.com")
(cache/ttl-cache-factory :ttl 20000)))
How can the cache be refreshed do I can rely on it?
(build-html-table @Dataset)
Thank you!