package resource_cache

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = {
  1. max_resources : int;
  2. idle_cleanup_after : Core.Time_ns.Span.t;
  3. max_resources_per_id : int;
  4. max_resource_reuse : int;
  5. close_idle_resources_when_at_limit : bool;
    (*

    The cache will close the least recently used idle resource when there is pressure at the max_resources limit.

    *)
  6. close_resource_on_unhandled_exn : bool;
    (*

    if close_resource_on_unhandled_exn is set to true, when the resource raises an exn after creation, it will be closed.

    *)
}
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t -> t -> int
val close_resource_on_unhandled_exn : t -> bool
val close_idle_resources_when_at_limit : t -> bool
val max_resource_reuse : t -> int
val max_resources_per_id : t -> int
val idle_cleanup_after : t -> Core.Time_ns.Span.t
val max_resources : t -> int
module Fields : sig ... end
val sexp_of_t : t -> Sexplib0.Sexp.t
val create : max_resources:int -> idle_cleanup_after:Core.Time_ns.Span.t -> max_resources_per_id:int -> max_resource_reuse:int -> close_idle_resources_when_at_limit:bool -> close_resource_on_unhandled_exn:bool -> t
module Stable : sig ... end
OCaml

Innovation. Community. Security.