io.jesi.backpack.cache

create-default

(create-default)(create-default seed)

Creates a TTL/LRU combination cache with default values and in initial seed (default {})

create-lru

(create-lru)(create-lru seed)(create-lru threshold seed)

Creates a Least Recently Used cache with an initial seed (default {}) and maximum value threshold (default 50).

create-ttl

(create-ttl)(create-ttl seed)(create-ttl ttl seed)

Creates a Time To Live cache with an initial seed (default {}) and maximum TTL in milliseconds (default 12 hours)

SimpleCache

protocol

A simple, self contained cache protocol

members

evict

(evict this entry)

Evicts the entry from the cache impl

get

(get this entry)

Retrieve the value associated with entry if it exists within the cache impl, else nil. May invoke a miss function to create the entry if not found.

reset

(reset this)

Resets the cache back to it’s initial value

set

(set this entry value)

Sets the entry to the specific value within the cache impl