Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changeset/green-experts-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'@qwik.dev/router': minor

Refactor route loaders to be backed by shared async signals across SSR, client refresh, and action invalidation.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format here is wrong

13 changes: 13 additions & 0 deletions .changeset/nasty-pans-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@qwik.dev/router': major
---

BREAKING: Qwik Router no longer retrieves `q-data.json` files on every SPA navigation. You can remove any caching rules for these.

Instead, Qwik Router now retrieves `q-loader-hash.manifestHash.json` for RouteLoader data. You can specify expiry for each RouteLoader individually, and it is automatically used to set browser caching headers. The `manifestHash` ensures that when you build a new version of your app, the old cached data will be invalidated and the new data will be fetched.

The default expiry for RouteLoader data is 5 minutes, so that prefetching and caching of RouteLoader data is enabled by default. You can set `expiry: 0` to mark a RouteLoader as never expiring.

Furthermore, any RouteLoader that has `expiry: 0` will be generated as a file during SSG, which allows SPA navigation to work even without a server.

Note: Be careful with caching for RouteLoaders that return user-specific data, especially regarding logout and CDN caching.
5 changes: 5 additions & 0 deletions .changeset/wicked-showers-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@qwik.dev/router': major
---

BREAKING: routeloader failures are no longer stored as `loaderSignal.value.failed` but instead are at `loaderSignal.error`. Reading `loaderSignal.value` will throw the error if the loader failed. This is in line with the AsyncSignal API.
Loading
Loading