Liking cljdoc? Tell your friends :D

deercreeklabs.stockroom


evict!clj/s

(evict! stockroom k)

Inputs: [stockroom :- Stockroom k :- Key] Returns: (s/eq nil)

Evicts the given key from the cache. Returns nil.

Inputs: [stockroom :- Stockroom k :- Key]
Returns: (s/eq nil)

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

flush!clj/s

(flush! stockroom)

Inputs: [stockroom :- Stockroom] Returns: (s/eq nil)

Flushes / empties the cache. Returns nil.

Inputs: [stockroom :- Stockroom]
Returns: (s/eq nil)

Flushes / empties the cache.
 Returns nil.
sourceraw docstring

Functionclj/s

source

getclj/s

(get stockroom k)

Inputs: [stockroom :- Stockroom k :- Key] Returns: (s/maybe Value)

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

Inputs: [stockroom :- Stockroom k :- Key]
Returns: (s/maybe Value)

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

Keyclj/s

source

keysclj/s

(keys stockroom)

Inputs: [stockroom :- Stockroom] Returns: [Key]

Returns all keys in the cache as a sequence.

Inputs: [stockroom :- Stockroom]
Returns: [Key]

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

memoize-srclj/s≠

clj
(memoize-sr f)
(memoize-sr f num-keys)
cljs
(memoize-sr G__6406)
(memoize-sr G__6410 G__6411)

Inputs: ([f :- Function] [f :- Function num-keys :- s/Int]) Returns: 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.

Inputs: ([f :- Function] [f :- Function num-keys :- s/Int])
Returns: 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)

Inputs: [stockroom :- Stockroom k :- Key v :- Value] Returns: (s/eq nil)

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

Inputs: [stockroom :- Stockroom k :- Key v :- Value]
Returns: (s/eq nil)

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

stockroomclj/s

(stockroom num-keys)

Inputs: [num-keys :- s/Int] Returns: Stockroom

Returns a new stockroom cache with the given capacity.

Inputs: [num-keys :- s/Int]
Returns: Stockroom

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

Stockroomclj/s

source

Valueclj/s

source

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

× close