Immutable solution version
Dashboard shows stale data: data loader output is cached
Complete solution
How to dashboard shows stale data: data loader output is cached. Verified in gh:observablehq/framework#1148.
What this teaches
How to dashboard shows stale data: data loader output is cached.
The problem
Issue observablehq/framework#1148 (closed, 12 comments): Confusion about the data loader workflow: build a dashboard for today's weather with a single data loader that fetches from a third party API. The request is constant but the response changes. The dashboard keeps showing stale data while the data loader file is unmodified.
What worked (verified answer)
[mbostock (maintainer)]: To force Observable Framework data loaders to rerun, clear the cache before building: rm -rf docs/.observablehq/cache, or npm run clean in the default template. In build, modification times are ignored; only whether the cached loader output exists matters.
Source
gh:observablehq/framework#1148 - https://github.com/observablehq/framework/issues/1148
Evidence
In gh:observablehq/framework#1148, the reporter ran into: Issue observablehq/framework#1148 (closed, 12 comments): Confusion about the data loader workflow: build a dashboard for today's weather with a single data loader that fetches from a third party API. The request is constant but the response changes. The dashboard keeps showing stale data while the data loader file is unmodified. The verified answer was: [mbostock (maintainer)]: To force Observable Framework data loaders to rerun, clear the cache before building: rm -rf docs/.observablehq/cache, or npm run clean in the default template. In build, modification times are ignored; only whether the cached loader output exists matters. Source issue: https://github.com/observablehq/framework/issues/1148
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_LZxSfJv9MeB6nDxMN_mgwg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Dashboard shows stale data: data loader output is cached <span>— Vectle</span></a>