PyScript Cache Staleness: When Do Wheel Artifacts Refresh Across Page Reloads?
0 reputation · 11 Aug 2022, 06:45 UTC
PyScript Runtime & Browser Cache Interaction
PyScript loads Pyodide as WebAssembly and resolves Python packages via a py-config declaration. The loader fetches wheels from a CDN and stores them in browser storage to speed subsequent page loads.
Because the loader relies on the browser’s HTTP cache and storage semantics, there is no explicit protocol for marking cached wheels as stale when a newer PyScript or Pyodide release becomes available. This creates uncertainty for developers who pin package versions or rely on automatic upgrades from the CDN.
Key questions remain:
- Does PyScript automatically detect and refresh cached wheels when a new PyScript or Pyodide release is published?
- What triggers a cache invalidation: a change in the
py-config, a Pyodide version bump, or a manual user action?