Liking cljdoc? Tell your friends :D

deercreeklabs.stockroom


evict!clj/s

(evict! stockroom k)

Evicts the given key from the cache. Returns nil.

Evicts the given key from the cache.
Returns nil.
sourceraw docstring

flush!clj/s

(flush! stockroom)

Flushes / empties the cache. Returns nil.

Flushes / empties the cache.
Returns nil.
sourceraw docstring

getclj/s

(get stockroom k)

Gets the value for the given key from the cache. Returns nil if the key is not present.

Gets the value for the given key from the cache.
Returns nil if the key is not present.
sourceraw docstring

keysclj/s

(keys stockroom)

Returns all keys in the cache as a sequence.

Returns all keys in the cache as a sequence.
sourceraw docstring

memoize-srclj/s

(memoize-sr f)
(memoize-sr f num-keys)

Memoizes the given function, based on the arguments passed to the function. Optionally takes a num-keys argument which specifies the cache capacity. If num-keys is not provided, a cache of size 100 is used. Returns the memoized function.

Memoizes the given function, based on the arguments passed to the function.
Optionally takes a `num-keys` argument which specifies the cache capacity.
If `num-keys` is not provided, a cache of size 100 is used.
Returns the memoized function.
sourceraw docstring

put!clj/s

(put! stockroom k v)

Adds the given key and value to the cache. Returns nil.

Adds the given key and value to the cache.
Returns nil.
sourceraw docstring

stockroomclj/s

(stockroom num-keys)

Returns a new stockroom cache with the given capacity.

Returns a new stockroom cache with the given capacity.
sourceraw docstring

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

× close