docs: add fuller explanation in routeRules example of swr/isr (#25436)

This commit is contained in:
TroyanOlga 2024-01-27 22:57:36 +01:00 committed by GitHub
parent a7afd77a30
commit a1dc40efdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 },