Skip to content

Latest commit

 

History

History
20 lines (18 loc) · 428 Bytes

README.md

File metadata and controls

20 lines (18 loc) · 428 Bytes

Simple clojure wrapper around https://github.com/ben-manes/caffeine cache.

Usage:

(require '[cloffeine.core :as cc])
(def settings (cc/map->CacheSettings {:maximumSize 5 :expireAfterWrite 3}))
(def cache (cc/make-cache settings))
(cc/put cache :a 1)
(cc/get-if-present cache :a)

Todo:

  • Loading/async loading
  • Refresh
  • Weight functions
  • Listeners
  • get rid of map->CacheSettings
  • Documentation