{"library":"strapi-plugin-rest-cache","title":"Strapi REST Cache Plugin","type":"library","description":"The Strapi REST Cache Plugin is a community-maintained solution for accelerating HTTP requests within Strapi applications by implementing a caching layer. It utilizes a provider-based architecture, allowing developers to choose from various storage backends like in-memory, Redis, or file system for caching responses. The plugin supports configurable caching strategies and features automatic invalidation of cached data when related content types are updated, mitigating issues with stale data. While the provided metadata indicates version 4.2.9, the latest significant release is v5.0.0, which introduced breaking changes for Strapi v5 compatibility. The project maintains an active development cadence, with frequent updates addressing bugs and adding features, aiming to improve Strapi API performance. It differentiates itself by its flexible provider system and automatic cache invalidation tied to Strapi content updates.","language":"javascript","status":"active","last_verified":"Wed Apr 22","install":{"commands":["npm install strapi-plugin-rest-cache"],"cli":null},"imports":["module.exports = { 'rest-cache': { enabled: true, config: { /* ... */ } } };","// No direct import for configuration. Configuration is defined in config/plugins.js","const memoryProvider = require('@strapi-community/provider-rest-cache-memory');"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":"https://strapi-community.github.io/strapi-plugin-rest-cache/","github":"https://github.com/strapi-community/strapi-plugin-rest-cache","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/strapi-plugin-rest-cache","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"module.exports = {\n  // ... other plugins\n  'rest-cache': {\n    enabled: true,\n    config: {\n      provider: {\n        name: 'memory',\n        options: {\n          max: 32767, // max number of items in cache\n          maxAge: 3600, // cache expiration time in seconds\n        },\n      },\n      strategy: {\n        contentTypes: [\n          // List of content types to cache\n          'api::article.article',\n          'api::category.category',\n        ],\n        maxAge: 3600, // global maxAge for content types\n        hitpass: false, // If true, cache will not be used if query params are present\n      },\n    },\n  },\n  // ...\n};\n","lang":"javascript","description":"This quickstart demonstrates how to enable the `rest-cache` plugin in a Strapi v4/v5 application using an in-memory provider and configure basic caching for specific content types in `config/plugins.js`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}