a caches library as a replacement for memoizations in Cumulo and Respo. It's mostly experimental.
[cumulo/caches "0.0.1"]
(caches.core/display-summay!)
Methods:
(show-summary!)
list entries after formatted(write-cache! params value)
write to cache, params
supposed to be a collection(access-cache params)
access and return value(or nil
)(new-loop!)
loop and trigger actions(perform-gc!)
remove entries that are probably no longer useful(reset-caches!)
clear caches for debugging purposesStorage structure:
(defonce *cache-states
(atom {:loop 0, ; counter
:caches {}, ; where caches are stored
:gc {:cold-duration 400, ; wait for N loops before triggering GC
:trigger-loop 100, ; trigger GC every N loops
:elapse-loop 50}})) ; entries are considered unuseful after not used for N loops
https://github.com/mvc-works/calcit-nodejs-workflow
MIT
Can you improve this documentation? These fine people already did:
jiyinyiyong & JonEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close