mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
docs: add fuller explanation in routeRules
example of swr/isr (#25436)
This commit is contained in:
parent
a7afd77a30
commit
a1dc40efdf
@ -84,9 +84,13 @@ export default defineNuxtConfig({
|
||||
routeRules: {
|
||||
// Homepage pre-rendered at build time
|
||||
'/': { prerender: true },
|
||||
// Product page generated on-demand, revalidates in background
|
||||
// Products page generated on demand, revalidates in background, cached until API response changes
|
||||
'/products': { swr: true },
|
||||
// Product page generated on demand, revalidates in background, cached for 1 hour (3600 seconds)
|
||||
'/products/**': { swr: 3600 },
|
||||
// Blog post generated on-demand once until next deploy
|
||||
// Blog posts page generated on demand, revalidates in background, cached on CDN for 1 hour (3600 seconds)
|
||||
'/blog': { isr: 3600 },
|
||||
// Blog post page generated on demand once until next deployment, cached on CDN
|
||||
'/blog/**': { isr: true },
|
||||
// Admin dashboard renders only on client-side
|
||||
'/admin/**': { ssr: false },
|
||||
|
Loading…
Reference in New Issue
Block a user