package js_of_ocaml

All checked builds pass
  1. Overview
  2. Docs
Compiler from OCaml bytecode to JavaScript

Install

dune-project
 Dependency

Authors

Maintainers

Sources

js_of_ocaml-6.5.0.tbz
sha256=a991ce25175a5a13240c8bf64354b8f35e0a8d7223b90bef01ba32bc6f929cf4
sha512=ce476986cb2c78990f29b1d7a01bb173a0d30ad0e0a80ba7bde9aa8365952ed01eda4935d92a323b982b0c1c897b20ef01eabe75fe80e4da858f73f6a2d25232

doc/js_of_ocaml/Js_of_ocaml/Cache/index.html

Module Js_of_ocaml.CacheSource

Cache API: persistent storage of Fetch Request/Response pairs.

Available from Dom_html.window and from ServiceWorker contexts; the Cache API requires a secure context. The methods are Promise-typed — see Promise.

Sourceclass type queryOptions = object ... end

Options controlling how a request is matched against cached entries. Create an empty record with empty_query_options.

Sourceval empty_query_options : unit -> queryOptions Js.t
Sourceclass type multiQueryOptions = object ... end

Like queryOptions but with a cacheName to restrict cacheStorage##match_withOptions to a single named cache. Create an empty record with empty_multi_query_options.

Sourceval empty_multi_query_options : unit -> multiQueryOptions Js.t
Sourceclass type cache = object ... end

A single named Cache instance, obtained from cacheStorage.

Sourceclass type cacheStorage = object ... end

The set of named Caches for the current origin, exposed as the global caches (see caches).

Sourceval caches : unit -> cacheStorage Js.t

The caches global (CacheStorage) for the current origin. Guard with is_supported in environments where the Cache API may be missing.

Sourceval is_supported : unit -> bool

Whether the caches global is available in the current environment.