Skip to content

Will Framework help me avoid cache based errors for Windows users when attached files are queried repeatedly? #1691

Answered by mbostock
eamcvey asked this question in Q&A
Discussion options

You must be logged in to vote

This unfortunately appears to be a DuckDB-Wasm issue (as you linked, and as described in #1470) so I’m not sure there’s anything we can do in Framework to resolve this issue automatically. But there are a variety of ways you could workaround it.

Perhaps the most direct workaround is to avoid caching on Windows. To ensure that the browser has not cached the Parquet file, you could add a query string with the current time to the file name. The SQL front matter only supports statically-registered sources, but you can use DuckDBClient.sql to register SQL sources dynamically in JavaScript.

```js
const sql = DuckDBClient.sql({
  gaia: FileAttachment("./lib/gaia-sample.parquet").href + (navigator.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@eamcvey
Comment options

@eamcvey
Comment options

@mbostock
Comment options

@brichards920
Comment options

@eamcvey
Comment options

Answer selected by eamcvey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants