One reference's cache entry: what the script its fetch recipe names last
answered for it, and when. How an entry is filled, refreshed and served is
YmerNode.References.Cache's; this is the row.
Shape decisions:
- One entry per reference, held by it: the reference's delete takes the row with it, and the unique index refuses a second.
- The content sits in exactly one of
body(text, in the node database) orpath(a file, relative to the cache directory) — which one follows the script'scachedeclaration. A database CHECK refuses both and neither. formatis the media type the script answered, and it alone decides how the entry is served — never where the bytes are kept.scriptnames the script that filled the entry. Areference_validatormeans something only to the script that issued it, so an entry filled by another script than the one the recipe names today is not handed to the new one.uriandfragmentare the target the entry was fetched for — the reference's at that moment. An entry whose target is not the one the reference names now is a miss, whatever wrote it.- An empty
bodyis a page with no text, and is kept as one: the changeset casts no value to nil, so""is a body and not an absent one. fetched_atis when the content last changed as far as the node knows — the last full answer — andchecked_atwhen the script was last asked, which an unchanged answer moves alone.
Summary
Functions
The changeset for a new entry and for a refetch. YmerNode.References.Cache
builds every value, so this is a backstop — except for the one-body-or-path
rule and the one entry per reference, which the database settles.
Functions
The changeset for a new entry and for a refetch. YmerNode.References.Cache
builds every value, so this is a backstop — except for the one-body-or-path
rule and the one entry per reference, which the database settles.