package aches-lwt

  1. Overview
  2. Docs

Lache

Lache is a library for Lwt-promise caches.

More specifically, Lache provides modules implementing caches for Lwt promises. These caches are based on Aches.Rache's Transfer-cache but store promises.

Note that Lache should not be used to cache resources which may need any form of clean-up (e.g., file-descriptors or network connections). Lache should only be used for promises. These promises are canceled when they are purged from the cache.

Caches

module type MAP = sig ... end

MAP are caches for plain promises.

module type MAP_OPTION = sig ... end

MAP_OPTION are caches for option promises (_ option Lwt.t).

module type MAP_RESULT = sig ... end

MAP_RESULT are caches for result promises (_ result Lwt.t).

Functors

module Make (C : Rache.TRANSFER) : MAP with type key = C.key

Make(C) is a MAP. The cache policies are that of C.

module Make_option (C : Rache.TRANSFER) : MAP_OPTION with type key = C.key

Make_option(C) is a MAP_OPTION. The cache policies are that of C.

module Make_result (C : Rache.TRANSFER) : MAP_RESULT with type key = C.key

Make_result(C) is a MAP_RESULT. The cache policies are that of C.

OCaml

Innovation. Community. Security.