Liking cljdoc? Tell your friends :D

pharmacist.cache

Caching tools for use with Pharmacist prescriptions

Caching tools for use with Pharmacist prescriptions
raw docstring

atom-mapclj/s

(atom-map ref)

Given a ref to use as a cache, returns a map of parameters to pass as the :cache parameter to pharmacist.prescription/fill in order to look up and store loaded data in the cache.

(require '[pharmacist.prescription :as p]
         '[pharmacist.cache :as c]
         '[clojure.core.cache :as cache])

(p/fill prescription {:cache (c/atom-map (atom (cache/ttl-cache-factory {})))})
Given a ref to use as a cache, returns a map of parameters to pass as
  the :cache parameter to [[pharmacist.prescription/fill]] in order to look up
  and store loaded data in the cache.

```clojure
(require '[pharmacist.prescription :as p]
         '[pharmacist.cache :as c]
         '[clojure.core.cache :as cache])

(p/fill prescription {:cache (c/atom-map (atom (cache/ttl-cache-factory {})))})
```
raw docstring

cache-getclj/s

(cache-get cache path prescription)

Look up data source in the cache. Expects all parameters in prescription to be dependency resolved and fully realized.

Look up data source in the cache. Expects all parameters in `prescription` to
be dependency resolved and fully realized.
raw docstring

cache-putclj/s

(cache-put cache path prescription value)

Put item in cache. Expects all parameters in prescription to be dependency resolved and fully realized.

Put item in cache. Expects all parameters in `prescription` to be dependency
resolved and fully realized.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close