Hwaro::Core::Build::CacheEntry
Inherits JSON::Serializable < Struct < Value < Object
Represents a cached entry for a file
Constructors
Instance methods
Fingerprint of the page bundle's colocated asset names (sorted,
length-prefixed) as of the build that wrote this entry. Adding or
removing a bundle asset changes what page.assets renders without
touching the page's own source, so it must be part of the cache
key. "" for pages with no assets AND for entries written before
this field existed — asset-carrying pages rebuild once when
upgrading from a legacy cache, asset-less pages don't.
Fingerprint of the page bundle's colocated asset names (sorted,
length-prefixed) as of the build that wrote this entry. Adding or
removing a bundle asset changes what page.assets renders without
touching the page's own source, so it must be part of the cache
key. "" for pages with no assets AND for entries written before
this field existed — asset-carrying pages rebuild once when
upgrading from a legacy cache, asset-less pages don't.
Fingerprint of the merged section [cascade] values that applied to this page when it was built. A parent _index.md cascade edit changes the fingerprint and invalidates the page even though its own source file is untouched.
Fingerprint of the merged section [cascade] values that applied to this page when it was built. A parent _index.md cascade edit changes the fingerprint and invalidates the page even though its own source file is untouched.
Files this page produced that are NOT its own output: its aliases
redirect stubs and, for a section, its /page/N/ pagination pages.
Kept apart from output_paths on purpose — that list also feeds
changed? ("a manually deleted sibling forces a rebuild"), and the
page count a section paginates into is only known AFTER rendering,
so it cannot take part in the decision to render. These paths exist
solely so a page that goes away, or stops producing one of them,
takes the file with it. Empty for entries written before this field.
Files this page produced that are NOT its own output: its aliases
redirect stubs and, for a section, its /page/N/ pagination pages.
Kept apart from output_paths on purpose — that list also feeds
changed? ("a manually deleted sibling forces a rebuild"), and the
page count a section paginates into is only known AFTER rendering,
so it cannot take part in the decision to render. These paths exist
solely so a page that goes away, or stops producing one of them,
takes the file with it. Empty for entries written before this field.
Fingerprint of the page's git metadata (latest commit hash, lastmod,
first_commit — see Render#page_git_hash) as of the build that wrote
this entry. With [git] enabled a new commit to an unedited file
changes page.updated/page.git and therefore the rendered output
even though the source bytes are unchanged, so it must be part of
the cache key. "" when the feature is off or the file has no
history, AND for legacy entries — so a disabled site never rebuilds
because of this field.
Fingerprint of the page's git metadata (latest commit hash, lastmod,
first_commit — see Render#page_git_hash) as of the build that wrote
this entry. With [git] enabled a new commit to an unedited file
changes page.updated/page.git and therefore the rendered output
even though the source bytes are unchanged, so it must be part of
the cache key. "" when the feature is off or the file has no
history, AND for legacy entries — so a disabled site never rebuilds
because of this field.
Generates an UInt64 hash value for this object.
This method must have the property that a == b implies a.hash == b.hash.
The hash value is used along with == by the Hash class to determine if two objects
reference the same hash key.
Subclasses must not override this method. Instead, they must define hash(hasher),
though usually the macro def_hash can be used to generate this method.
Secondary sibling output files this page emitted beyond
output_path (e.g. index.json, index.xml — see [outputs]).
Empty for pages with no extra formats and for every entry written
before this feature existed (legacy cache JSON loads with []).
Secondary sibling output files this page emitted beyond
output_path (e.g. index.json, index.xml — see [outputs]).
Empty for pages with no extra formats and for every entry written
before this feature existed (legacy cache JSON loads with []).
Fingerprint of what this page renders from OTHER pages, one by one:
its prev/next neighbours, series, related posts, translations and
ancestors (when its templates read them), the pages it fetches with
a literal get_page(path=...), and the URLs its @/ links resolve
to. None of those move this page's own source, and none of them are
a listing the global page-set fingerprint gates, so retitling a post
left its neighbours' "next: …" link — and every @/ link to a
renamed page — stale on warm builds. "" when the page reads none of
them, and for legacy entries: a page that reads none never rebuilds
because of this field, while every page that does re-renders once
on the first warm build after upgrading (its legacy "" no longer
matches).
Fingerprint of what this page renders from OTHER pages, one by one:
its prev/next neighbours, series, related posts, translations and
ancestors (when its templates read them), the pages it fetches with
a literal get_page(path=...), and the URLs its @/ links resolve
to. None of those move this page's own source, and none of them are
a listing the global page-set fingerprint gates, so retitling a post
left its neighbours' "next: …" link — and every @/ link to a
renamed page — stale on warm builds. "" when the page reads none of
them, and for legacy entries: a page that reads none never rebuilds
because of this field, while every page that does re-renders once
on the first warm build after upgrading (its legacy "" no longer
matches).
Source size alongside the mtime: a tool that restores mtimes
(rsync -t, tar) can bring back the old mtime with new bytes, and
a size change then still re-hashes the file. -1 (unknown) for
entries written before this field: only their mtime is compared.
Source size alongside the mtime: a tool that restores mtimes
(rsync -t, tar) can bring back the old mtime with new bytes, and
a size change then still re-hashes the file. -1 (unknown) for
entries written before this field: only their mtime is compared.