Functor Os_request_cache.Make
module Make : functor (M : sig type key<<div class="odocwiki_info"|~The type of your key~. >> type value<<div class="odocwiki_info"|~The type of the stored value~. >> val compare :
key ->
key -> int<<div class="odocwiki_info"|~The function used to compare keys~. >> val get :
key ->
value Lwt.t<<div class="odocwiki_info"|~This function is called when the value corresponding to a key is not yet stored into the cache~. >>end) ->
Cache_sigwith type key = M.key and type value = M.value
Functor which creates a module Os_request_cache.Cache_sig.
Parameters :
M | : | sig type key ( The type of your key. *) type value ( The type of the stored value. *) val compare : key -> key -> int ( The function used to compare keys. *) val get : key -> value Lwt.t ( This function is called when the value corresponding to a key is not yet stored into the cache. *) end |
type key
The type of the key
type value
The type of the value
val has : key -> bool
Returns true if the key has been stored into the cache.
val set :
key ->
value -> unit
Set the corresponding value for a key.
val reset : key -> unit
Remove a value for the given key.
val get :
key ->
value Lwt.t
Get the value corresponding to the given key.