strapi-community / strapi-plugin-rest-cache

Speed-up HTTP requests with LRU cache.
https://strapi-community.github.io/strapi-plugin-rest-cache/
MIT License
129 stars 29 forks source link

Purge method not showing log on debug #95

Open ednilsonamaral opened 2 months ago

ednilsonamaral commented 2 months ago

The PURGE method works normally, but the PURGE log is not saved correctly.

Sometimes the PURGE is logged, but most of the time it is not. Do you know if it is something related to the plugin or a specific configuration?

The MISS, HIT and HITPASS operations are logged correctly.

Config:

redis: {
    enabled: true,
    config: {
      connections: {
        default: {
          connection: cacheObjConnection,
          settings: {
            debug: true,
          },
        },
      },
    },
  },
  'rest-cache': {
    enabled: true,
    config: {
      provider: {
        name: 'redis',
        getTimeout: 4000,
        options: {
          connection: 'default',
        },
      },
      strategy: {
        debug: true,
        enableETag: true,
        enableXCacheHeaders: true,
        enableAdminCTBMiddleware: true,
        resetOnStartup: false,
        clearRelatedCache: true,
        keysPrefix: 'rest-cache',
        maxAge: 259200000, // 3 days
        contentTypes: [ ... ],
      },
    },