My agentic slop goes here. Not intended for anyone else!
1(** Cache entry information
2
3 This module represents individual cache entries with their metadata. *)
4
5(** Abstract type representing a cache entry *)
6type t
7
8(** {1 Construction} *)
9
10(** Create an entry from components *)
11val create : key:string -> size:int64 -> mtime:float -> ttl:float option ->
12 flags:Flags.t -> t
13
14(** {1 Accessors} *)
15
16(** Get the key of the entry *)
17val key : t -> string
18
19(** Get the size in bytes *)
20val size : t -> int64
21
22(** Get the modification time *)
23val mtime : t -> float
24
25(** Get the time-to-live (if any) *)
26val ttl : t -> float option
27
28(** Get the flags *)
29val flags : t -> Flags.t
30
31(** {1 Predicates} *)
32
33(** Check if entry has expired *)
34val is_expired : t -> bool
35
36(** Check if entry is pinned *)
37val is_pinned : t -> bool
38
39(** Check if entry is stale *)
40val is_stale : t -> bool
41
42(** Check if entry is temporary *)
43val is_temporary : t -> bool
44
45(** {1 Comparison} *)
46
47(** Compare by modification time (for sorting) *)
48val compare_by_mtime : t -> t -> int
49
50(** Compare by size (for sorting) *)
51val compare_by_size : t -> t -> int
52
53(** {1 Pretty Printing} *)
54
55(** Pretty printer for entries *)
56val pp : Format.formatter -> t -> unit
57
58(** {1 JSON Support} *)
59
60(** Jsont codec for cache entries *)
61val jsont : t Jsont.t