ReviewOS

stacks/stx

SSG cache indefinitely reuses external server data across builds

#2134
Closed chris opened this 4 days ago ·
4 days ago

A normal cached LSU website build keeps an old HQ catalog description after the API returns updated content. The embedded portal is current, but the host page remains stale indefinitely.

BuildCache keys rendered HTML only on source/dependency mtimes. A <script server> in a page, layout, include or component can fetch external data without any source changing. Existing durable entries therefore prevent that script from executing on subsequent builds.

Re-render pages with server data on each build, including transitive template dependencies and companion data loaders; preserve cache hits for unchanged static/client-only pages. Existing cache entries must refresh automatically, without users clearing or disabling caching. Regress with a real changing HTTP source and unchanged template files.

Refs https://github.com/stacksjs/hq.training/issues/301 and https://github.com/stacksjs/hq.training/issues/346.

Sign in to comment on this issue.