package omod

  1. Overview
  2. Docs
Lookup and load installed OCaml modules

Install

Dune Dependency

Authors

Maintainers

Sources

omod-0.0.3.tbz
sha512=4f53b8cdd054dc1a6813427452a91294e0bbcfefe948fc1caec47be136dbcecf13112bf2b620fa2f667592b04b28df74e3bf012ea0fb0038c1da4217155ca626

doc/omod.support/Omod_support/Cache/index.html

Module Omod_support.Cache

Omod cache.

type t

The type for cached information.

val v : pkgs:Pkg.db -> t

v ~pkgs is a cache with package database pkgs.

val pkgs : t -> Pkg.db

pkgs c is c's package database.

val file : Conf.t -> Omod.fpath

file conf is the cache file in configuration conf.

val read : Conf.t -> force:bool -> err:Log.t -> (t option, string) result

read conf is the cache of configuration conf (if any). If force is true and a cache read error occurs, it is logged on err and Ok None is returned.

val write : Conf.t -> t -> (unit, string) result

write conf c writes the cache c of configuration conf.

val clear : Conf.t -> (unit, string) result

clear conf clears the cache c of configuration conf.

val get : ?err:Log.t -> ?note:Log.t -> ?progress:bool -> Conf.t -> force:bool -> trust:bool -> (t, string) result

get ~err ~note ~progress conf ~force ~trust get the cache of configuration conf, forcing it if force is true and making sure it is fresh unless trust is true, using err to report errors, note to report indexing operations (defaults to Log.nil) and progress to indicate if progress should be reported on note (defaults to false).

val status : ?err:Log.t -> Conf.t -> t option -> Pkg.diff list

status ~err conf c is the status of cache c of configuration conf.

val codec : t Codec.t

codec is a codec for caches.

OCaml

Innovation. Community. Security.