An index store mapping keys to values. Keys are associated to optional values in the index which allows them to be removed.

type t

The type of store build in indexes

type key

The type of keys for the

type value

The type of values stored in the index

val mem : t -> key -> bool Lwt.t

Returns true if the key has a value associated in the store.

val find : t -> key -> value option Lwt.t

Returns the value associated to a key in the store, or None otherwise.

val add : ?flush:bool -> t -> key -> value -> unit Lwt.t

Add an association from a key to a value in the store. If flush (default to true) is set, the index is written on disk right away.

val remove : ?flush:bool -> t -> key -> unit Lwt.t

Removes an association from the store. Does nothing if the key was not registered.