strapi-community/strapi-plugin-rest-cache

Max measure unit + docs improvements

Opened this issue ยท 2 comments

Hello,
when using the configuration,

module.exports = {
  // Step 1: Configure the redis connection
  // @see https://github.com/strapi-community/strapi-plugin-redis
  redis: {
    // ...
  },
  // Step 2: Configure the redis cache plugin
  "rest-cache": {
    config: {
      provider: {
        name: "redis",
        options: {
          max: 32767,
          connection: "default",
        },
      },
      strategy: {
        // if you are using keyPrefix for your Redis, please add <keysPrefix>
        keysPrefix: "<redis_keyPrefix>",
        contentTypes: [
          // list of Content-Types UID to cache
          "api::category.category",
          "api::article.article",
          "api::global.global",
          "api::homepage.homepage",
        ],
      },
    },
  },
};

is the max setting in mb/kb/gb?

Hey, in this article it's mentioned that

Max denotes the maximum number of entries that the cache can take in. By default, this number is set to 32767.

So to answer your question, the measure unit is number of entries. Hope that helps you, I was also wondering what this means and I think it should be mentioned in the docs ๐Ÿ˜„

Thanks for clarifying it out for me, it should be written on the docs , probably we can just do a pull request of the docs