Skip to content
fogus edited this page Aug 28, 2012 · 4 revisions
(def C (-> {:a 1 :b 2}
       (fifo-cache-factory :threshold 2)
       (ttl-cache-factory  :ttl 5000)))

;; right away
  
(assoc C :c 42)
;;=> {:b 2, :c 42}                                                                                   
  
;; wait 5 seconds                                                                                    
  
(assoc C :d 138)
;;=> {:d 138}
Clone this wiki locally