(** Cache statistics This module represents aggregate cache statistics. *) (** Abstract type representing cache statistics *) type t (** {1 Construction} *) (** Create empty statistics *) val empty : t (** Create statistics from values *) val create : total_size:int64 -> entry_count:int -> expired_count:int -> pinned_count:int -> stale_count:int -> temporary_count:int -> t (** Compute statistics from a list of entries *) val of_entries : Entry.t list -> t (** {1 Accessors} *) (** Total size in bytes *) val total_size : t -> int64 (** Number of entries *) val entry_count : t -> int (** Number of expired entries *) val expired_count : t -> int (** Number of pinned entries *) val pinned_count : t -> int (** Number of stale entries *) val stale_count : t -> int (** Number of temporary entries *) val temporary_count : t -> int (** {1 Pretty Printing} *) (** Pretty printer for statistics *) val pp : Format.formatter -> t -> unit (** {1 JSON Support} *) (** Jsont codec for cache statistics *) val jsont : t Jsont.t