Module Fetch.Cache
Fetch caches.
val query_opts :
?ignore_search:bool ->
?ignore_method:bool ->
?ignore_vary:bool ->
?cache_name:Jstr.t ->
unit ->
Brr_io.Fetch.Cache.query_optsquery_opts ~ignore_search ~ignore_method ~ignore_vary ~cache_name () are query options with given parameters.
The type for Cache objects.
val match' :
?query_opts:Brr_io.Fetch.Cache.query_opts ->
Brr_io.Fetch.Cache.t ->
Brr_io.Fetch.Request.t ->
Brr_io.Fetch.Response.t option Fut.or_errormatch' c req is a stored response for req in c (if any).
val match_all :
?query_opts:Brr_io.Fetch.Cache.query_opts ->
Brr_io.Fetch.Cache.t ->
Brr_io.Fetch.Request.t ->
Brr_io.Fetch.Response.t list Fut.or_errormatch_all c req is a list stored response for req in c.
val add : Brr_io.Fetch.Cache.t -> Brr_io.Fetch.Request.t -> unit Fut.or_erroradd c req fetches req and adds the response to c.
val add_all :
Brr_io.Fetch.Cache.t ->
Brr_io.Fetch.Request.t list ->
unit Fut.or_erroradd_all c reqs fetches reqs and adds their reponses to c.
val put :
Brr_io.Fetch.Cache.t ->
Brr_io.Fetch.Request.t ->
Brr_io.Fetch.Response.t ->
unit Fut.or_errorput c req resp puts the req/resp pair to the cache.
val delete :
?query_opts:Brr_io.Fetch.Cache.query_opts ->
Brr_io.Fetch.Cache.t ->
Brr_io.Fetch.Request.t ->
bool Fut.or_errordelete c req deletes response to req from the cache. false is returned if req was not in the cache.
val keys :
?query_opts:Brr_io.Fetch.Cache.query_opts ->
?req:Brr_io.Fetch.Request.t ->
Brr_io.Fetch.Cache.t ->
Brr_io.Fetch.Request.t list Fut.or_errorkeys c are the requests cached by c.
Cache storage
module Storage : sig ... endCache storage objects.
val to_jv : Brr_io.Fetch.Cache.t -> Jv.jvval of_jv : Jv.jv -> Brr_io.Fetch.Cache.t