Module type Cache.Store

module type Store = sig .. end
Caching store

A Store is the backend used to store the values in a cache. A store is a key/value associative table.


type ('k, 'v) t 
A key value store.
type 'a with_init_args 
val cps_create : f:(('a, 'c) t -> 'b) -> 'b with_init_args
cps_create is given in CPS form to enable chaining.

see Cache.Strategy.cps_create for more information.

val clear : ('k, 'v) t -> unit
Remove all the values from the store.
val replace : ('k, 'v) t -> key:'k -> data:'v -> unit
replace store ~key ~data associated the data to key; remove any previously existing binding.
val find : ('k, 'v) t -> 'k -> 'v option
find store key returns the value associated to key in store.
val data : ('a, 'v) t -> 'v list
data store returns all values in store.
val remove : ('k, 'v) t -> 'k -> unit
remove store key removes the binding for key in store.