(** Cache entry information This module represents individual cache entries with their metadata. *) (** Abstract type representing a cache entry *) type t (** {1 Construction} *) (** Create an entry from components *) val create : key:string -> size:int64 -> mtime:float -> ttl:float option -> flags:Flags.t -> t (** {1 Accessors} *) (** Get the key of the entry *) val key : t -> string (** Get the size in bytes *) val size : t -> int64 (** Get the modification time *) val mtime : t -> float (** Get the time-to-live (if any) *) val ttl : t -> float option (** Get the flags *) val flags : t -> Flags.t (** {1 Predicates} *) (** Check if entry has expired *) val is_expired : t -> bool (** Check if entry is pinned *) val is_pinned : t -> bool (** Check if entry is stale *) val is_stale : t -> bool (** Check if entry is temporary *) val is_temporary : t -> bool (** {1 Comparison} *) (** Compare by modification time (for sorting) *) val compare_by_mtime : t -> t -> int (** Compare by size (for sorting) *) val compare_by_size : t -> t -> int (** {1 Pretty Printing} *) (** Pretty printer for entries *) val pp : Format.formatter -> t -> unit (** {1 JSON Support} *) (** Jsont codec for cache entries *) val jsont : t Jsont.t