Skip to content

Data loading & caching

Route Loader + StaleTime cache + revalidation + query updates. Meta: Data & caching demo

Loader result

Loaded at
02:56:14.305
Was revalidation
False
Page (from query)
1

Navigate away and come back within 30s: Loaded at stays the same - the loader was skipped (fresh cache hit). After 30s the cached value renders instantly and refreshes in the background (stale-while-revalidate).

Refresh

RevalidateAsync re-runs this chain's loaders in place - the URL doesn't change, guards don't re-run, and this content stays visible until fresh data lands (Was revalidation flips to True).

Query updates

page 1

NavigateWithQuery(q => q.Set("page", n)) updates one parameter, preserves the rest, and replaces the history entry by default. Each page value is its own cache entry.