{"id":18625,"library":"nuxt-ssr-cache","title":"Nuxt SSR Cache","description":"nuxt-ssr-cache v1.5.2 is a cache middleware for Nuxt.js server-side rendering. It supports multiple cache stores: in-memory, Redis, Memcached, and layered multi-cache. The package allows prefixing cache keys by host, custom key functions, and version-based automatic cache purging on deployment. It is designed for Nuxt.js applications needing to reduce SSR load by caching rendered pages. The library has been stable since its last release but is not frequently updated. It relies on the Nuxt module system and optional peer dependencies for Redis and Memcached stores.","status":"maintenance","version":"1.5.2","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/arash16/nuxt-ssr-cache","tags":["javascript","nuxt","ssr","cache","redis","vue","spa"],"install":[{"cmd":"npm install nuxt-ssr-cache","lang":"bash","label":"npm"},{"cmd":"yarn add nuxt-ssr-cache","lang":"bash","label":"yarn"},{"cmd":"pnpm add nuxt-ssr-cache","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required only when using the Redis store type.","package":"cache-manager-redis","optional":true},{"reason":"Required only when using the Memcached store type.","package":"cache-manager-memcached-store","optional":true}],"imports":[{"note":"This package is a Nuxt module; it must be added to the modules array in nuxt.config.js, not imported directly in component code.","wrong":"import nuxtSsrCache from 'nuxt-ssr-cache' // Not a direct import; used as Nuxt module","symbol":"default","correct":"// Add to modules in nuxt.config.js: 'nuxt-ssr-cache'"}],"quickstart":{"code":"// nuxt.config.js\nmodule.exports = {\n  version: '1.0.0',\n  modules: ['nuxt-ssr-cache'],\n  cache: {\n    useHostPrefix: false,\n    pages: ['/', '/about'],\n    store: {\n      type: 'memory',\n      max: 100,\n      ttl: 60\n    }\n  }\n}","lang":"javascript","description":"Configure nuxt-ssr-cache as a Nuxt module with in-memory cache for root and about pages, 60-second TTL."},"warnings":[{"fix":"If you need to use `useHostPrefix` or `pages`, do not define the `key` function.","message":"The `key` option function, when provided, overrides both `useHostPrefix` and `pages`. Those properties are ignored.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure `stores` array is provided with at least one store configuration.","message":"For multi-store (layered) cache, the `stores` array must contain configuration objects; using `type: 'multi'` alone without `stores` will cause an error.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider using newer Redis/Memcached cache stores or evaluate alternative cache modules for Nuxt.","message":"The package relies on `cache-manager-redis` and `cache-manager-memcached-store`, which are older libraries and may not be actively maintained.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Update store configuration to object form: `store: { type: 'memory', ... }`.","message":"In version 1.2.0, the `cache` config structure changed: `store` now expects an object with `type` instead of a string. Old configs with `store: 'memory'` will break.","severity":"breaking","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install the Redis store package: `npm install cache-manager-redis`","cause":"Missing optional dependency for Redis store.","error":"Error: Cannot find module 'cache-manager-redis'"},{"fix":"Change to object format: `store: { type: 'memory', max: 100, ttl: 60 }`","cause":"Using old string-based store configuration (e.g., `store: 'memory'`) after version 1.2.0.","error":"Error: The cache store configuration is invalid. Expected an object with a 'type' property."},{"fix":"Ensure `pages` is an array of strings (path prefixes) or RegExp objects.","cause":"Passing a non-array or invalid element in the `pages` option.","error":"Error: Invalid pages configuration. Pages must be an array of strings or RegExp."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}