struct

Hwaro::Core::Build::CacheMetadata

Inherits JSON::Serializable < Struct < Value < Object

Persistent build metadata stored alongside per-file entries

Constructors

new(template_hash : String = "", config_hash : String = "", page_set_hash : String = "", section_set_hash : String = "")
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

config_hash
Source
config_hash=(config_hash : String)
Source
generated_outputs

Output files the last build produced that no cache ENTRY covers: the taxonomy index/term pages, their pagination pages and their feeds. Those have no content file, so nothing else remembers them, and a --cache build (which keeps the output directory) left the term page of a tag whose last post was deleted published forever. Stored relative to the output directory so moving the workspace, or switching between an absolute and a relative -o, does not strand them. Empty for caches written before this field existed: the first build after an upgrade records the set and prunes from the next one.

Source
generated_outputs=(generated_outputs : Array(String))

Output files the last build produced that no cache ENTRY covers: the taxonomy index/term pages, their pagination pages and their feeds. Those have no content file, so nothing else remembers them, and a --cache build (which keeps the output directory) left the term page of a tag whose last post was deleted published forever. Stored relative to the output directory so moving the workspace, or switching between an absolute and a relative -o, does not strand them. Empty for caches written before this field existed: the first build after an upgrade records the set and prunes from the next one.

Source
generator_version

hwaro version that wrote this cache. Every hash above fingerprints the inputs (sources, templates, config, cascade) — none of them move when only the renderer changes, so a build that fixes how markdown becomes HTML would otherwise never reach a --cache site: its pages are unedited, so they stay skipped indefinitely. Treating a version change as a full invalidation costs one cold build per upgrade and makes every future rendering fix actually land.

Written by Cache#save (which always stamps the running version, so the in-memory rebuilds in set_global_checksums/set_set_fingerprints cannot drop it) and compared by Cache#load. Default "" so caches written before this field existed invalidate once on upgrade.

Source
generator_version=(generator_version : String)

hwaro version that wrote this cache. Every hash above fingerprints the inputs (sources, templates, config, cascade) — none of them move when only the renderer changes, so a build that fixes how markdown becomes HTML would otherwise never reach a --cache site: its pages are unedited, so they stay skipped indefinitely. Treating a version change as a full invalidation costs one cold build per upgrade and makes every future rendering fix actually land.

Written by Cache#save (which always stamps the running version, so the in-memory rebuilds in set_global_checksums/set_set_fingerprints cannot drop it) and compared by Cache#load. Default "" so caches written before this field existed invalidate once on upgrade.

Source
output_dir

Output directory this cache was built for, RELATIVE to the project root when it lives inside it. Alternating -o dist and -o preview from one checkout must invalidate (each tree holds pre-edit files the source hashes would otherwise mark up to date), but merely moving the workspace must NOT — hence relative, not absolute.

Source
output_dir=(output_dir : String)

Output directory this cache was built for, RELATIVE to the project root when it lives inside it. Alternating -o dist and -o preview from one checkout must invalidate (each tree holds pre-edit files the source hashes would otherwise mark up to date), but merely moving the workspace must NOT — hence relative, not absolute.

Source
page_set_hash

Fingerprints of the global page/section sets. Listing pages (homepage, section indexes, archives, taxonomy widgets) render content derived from these sets even when their own source is unchanged, so a change here forces those pages to re-render on an incremental build. Default "" so older cache files (without these keys) load and rebuild once.

Source
page_set_hash=(page_set_hash : String)

Fingerprints of the global page/section sets. Listing pages (homepage, section indexes, archives, taxonomy widgets) render content derived from these sets even when their own source is unchanged, so a change here forces those pages to re-render on an incremental build. Default "" so older cache files (without these keys) load and rebuild once.

Source
racy_copies

Static and bundle copies made while their source mtime was still inside its timestamp tick (#859). The copy is stamped with the source mtime, so a same-size rewrite in that tick matches it exactly; the next build byte-compares these instead of trusting the match.

Source
racy_copies=(racy_copies : Array(String))

Static and bundle copies made while their source mtime was still inside its timestamp tick (#859). The copy is stamped with the source mtime, so a same-size rewrite in that tick matches it exactly; the next build byte-compares these instead of trusting the match.

Source
render_input_keys
Source
render_input_keys=(render_input_keys : Array(String))
Source
render_inputs_hash

Digest of what templates read OUTSIDE the tracked files: the build-derived globals (asset-bundle manifest, auto-include tags and their ?v=) plus the current value of every recorded render read (env() names, load_data() files, resize_image() sources — see TemplateEngine.record_render_read). Only the digest and the read KEYS are stored: an env value may be a secret. "" (a cache written before this existed) compares as unknown, not as a change.

Source
render_inputs_hash=(render_inputs_hash : String)

Digest of what templates read OUTSIDE the tracked files: the build-derived globals (asset-bundle manifest, auto-include tags and their ?v=) plus the current value of every recorded render read (env() names, load_data() files, resize_image() sources — see TemplateEngine.record_render_read). Only the digest and the read KEYS are stored: an env value may be a secret. "" (a cache written before this existed) compares as unknown, not as a change.

Source
section_set_hash
Source
section_set_hash=(section_set_hash : String)
Source
template_hash
Source
template_hash=(template_hash : String)
Source