A Nuxt 3 module that adds in-memory caching for server-side rendered pages. Version 1.1.0 is current. It allows configuration of cache store (memory, with Redis placeholder), TTL, max cache size, custom cache keys based on route/headers/device, per-environment enabling, and experimental response compression and per-page cache bypass. Limitations include no built-in Redis support (planned), no regex patterns for pages, and a notable security caveat about caching user-specific data. Differentiators: simple integration, device-aware key generation, and experimental features.
npm install nuxt-cache-ssrNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures nuxt-cache-ssr module with memory store, caching for home, products, and about pages, and a custom key function that differentiates crawlers and uses language header.
Ensure cached pages only contain public content; use the `key` function with `return false` to bypass cache for sensitive routes.
Avoid relying on experimental features in production; monitor releases for stable API.
Use precise prefixes or implement custom key function with route matching logic.
Restart the server or manually clear cache (e.g., via module options) when toggling enabled.
Run `npm install ohash` or ensure your package manager installs peer dependencies.
Add a guard in the key function: `if (!device) return route`.
Upgrade to Nuxt 3 or use an alternative caching module for Nuxt 2.