Skip to content

plugin-rest-cache with memory is not working on launch application #118

@ferranpuigmar

Description

@ferranpuigmar

Hi, I'm trying to add the rest cache plugin in my project, but once I install the @strapi-community/plugin-rest-cache and ised it in the plugin.ts:

"rest-cache": { config: { provider: { name: "memory", options: { max: 32767, maxAge: 3600, }, }, strategy: { contentTypes: [ "api::landing.landing", ], }, }, },

this error appears in the terminal:

Error: Could not load REST Cache provider "memory". You may need to install a provider plugin "yarn add @strapi-community/provider-rest-cache-memory". │ │ at createProvider (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi-community/plugin-rest-cache/dist/server/index.js:245:11) │ │ at Object.bootstrap (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi-community/plugin-rest-cache/dist/server/index.js:271:26) │ │ at process.processTicksAndRejections (node:internal/process/task_queues:95:5) │ │ at async Object.bootstrap (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi/core/dist/domain/module/index.js:37:13) │ │ at async Object.bootstrap (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi/core/dist/registries/modules.js:25:17) │ │ at async Strapi.runPluginsLifecycles (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi/core/dist/Strapi.js:418:9) │ │ at async Strapi.bootstrap (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi/core/dist/Strapi.js:377:9) │ │ at async Strapi.load (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi/core/dist/Strapi.js:312:9) │ │ at async Object.develop (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi/strapi/dist/src/node/develop.js:170:32) │ │ at async action (/Users/ferranpuig/promofarma/api-marketing-cms/node_modules/@strapi/strapi/dist/src/cli/commands/develop.js:15:9)

Even though the documentation mention that the memory plugin comes with default witht he new plugin, I have tried to install also the @strapi-community/provider-rest-cache-memory bit it still showing the same error message.

¿Could you have any idea what is wrong?

Thanks,
Ferran

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions