Module Omod_support.Cache
Omod cache.
val file : Conf.t -> Omod.fpath
file conf
is the cache file in configurationconf
.
val read : Conf.t -> force:bool -> err:Log.t -> (t option, string) Stdlib.result
read conf
is the cache of configurationconf
(if any). Ifforce
istrue
and a cache read error occurs, it is logged onerr
andOk None
is returned.
val write : Conf.t -> t -> (unit, string) Stdlib.result
write conf c
writes the cachec
of configurationconf
.
val clear : Conf.t -> (unit, string) Stdlib.result
clear conf
clears the cachec
of configurationconf
.
val get : ?err:Log.t -> ?note:Log.t -> ?progress:bool -> Conf.t -> force:bool -> trust:bool -> (t, string) Stdlib.result
get ~err ~note ~progress conf ~force ~trust
get the cache of configurationconf
, forcing it ifforce
istrue
and making sure it is fresh unlesstrust
istrue
, usingerr
to report errors,note
to report indexing operations (defaults toLog.nil
) andprogress
to indicate if progress should be reported onnote
(defaults tofalse
).