Module Memoir_content.Build_cache

Incremental-build cache: maps each source file to a content hash so unchanged files can be skipped on rebuild.

type t
val load : cache_file:string -> t

Load the cache from cache_file; empty if the file is absent or unreadable.

val empty : cache_file:string -> t

An empty cache that will persist to cache_file (used for a forced full rebuild).

val needs_rebuild : t -> string -> bool

Whether file must be rebuilt: true if it has no recorded hash, its content changed since last build, or it is an aggregating section index (which is always rebuilt).

val record : t -> string -> t

Record file's current content hash, and invalidate the section index that aggregates it (so blog/journal listings regenerate).

val save : t -> unit

Persist the cache to its file.