This is server API (go to client)

Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Os_request_cache

module Os_request_cache : sig..end

Caching request data to avoid doing the same computation several times during the same request.


module type Cache_sig = sig..end
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.