package brr

  1. Overview
  2. Docs
On This Page
  1. Cache storage
Browser programming toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

brr-0.0.8.tbz
sha512=49e7bfbad2ea6a0139354e4a33c59c8a113c4c1e20a4f629bc5cad24aa801e474b4af10ce35adbda5d23dd294d1de5efa5b10bb3030d03f4758459977250a0f6

doc/brr/Brr_io/Fetch/Cache/index.html

Module Fetch.CacheSource

Fetch caches.

Sourcetype query_opts

The type for query options.

Sourceval query_opts : ?ignore_search:bool -> ?ignore_method:bool -> ?ignore_vary:bool -> ?cache_name:Jstr.t -> unit -> query_opts

query_opts ~ignore_search ~ignore_method ~ignore_vary ~cache_name () are query options with given parameters.

Sourcetype t

The type for Cache objects.

Sourceval match' : ?query_opts:query_opts -> t -> Request.t -> Response.t option Fut.or_error

match' c req is a stored response for req in c (if any).

Sourceval match_all : ?query_opts:query_opts -> t -> Request.t -> Response.t list Fut.or_error

match_all c req is a list stored response for req in c.

Sourceval add : t -> Request.t -> unit Fut.or_error

add c req fetches req and adds the response to c.

Sourceval add_all : t -> Request.t list -> unit Fut.or_error

add_all c reqs fetches reqs and adds their reponses to c.

Sourceval put : t -> Request.t -> Response.t -> unit Fut.or_error

put c req resp puts the req/resp pair to the cache.

Sourceval delete : ?query_opts:query_opts -> t -> Request.t -> bool Fut.or_error

delete c req deletes response to req from the cache. false is returned if req was not in the cache.

Sourceval keys : ?query_opts:query_opts -> ?req:Request.t -> t -> Request.t list Fut.or_error

keys c are the requests cached by c.

Cache storage

Sourcemodule Storage : sig ... end

Cache storage objects.