core.cache is a small and convenient cache library for clojure. It enables clojure users to quickly roll out caches. In this blog post I am going to describe a clojure implementation which stores cache entries to disk: fort-knox.
In a few recent projects I’ve needed a cache with entries backed to disk. This is a vital requirement in applications that need to be fault-tolerant. LMDB (which I’ve had very positive experiences with) is fast, quick and perfect for this task.
fort-knox implements the
core.cache spec and stores entries in LMDB.
clj-lmdb (subject of a previous blog post) is part of the plan now.
Note that this library deviates slightly from suggestions for
core.cache implementations. For instance, the backing store doesn’t implement
fort-knox might deviate from expected behavior. Thus YMMV.