express-redis-cache icon indicating copy to clipboard operation
express-redis-cache copied to clipboard

Cache never expire

Open kouz75 opened this issue 8 years ago • 2 comments

Hi, We are using express-redis-cache with aws-serverless-express 3.x on AWS Lambda (node 6.10)

I have configure the redis cache ttl to 60s for Http Status 200:

app.use("/api/*",cache.route({expire: {200: 60, xxx: 10}}),function(req, res, next) { next(); });

Most of the time, cache is refresh correctly (each 60s) but sometime, the response is cache forever.

The bug appear only on production.

kouz75 avatar Nov 13 '17 10:11 kouz75

Hi @kouz75 ,

I experienced the same problem. On my machine it occurred after I introduced the expire option. All pages that had been cached before are still never expiring.

For me a total erasure of all affected objects in the database was the solution.

abulvenz avatar Jan 25 '19 22:01 abulvenz

@rawpixel-vincent It would be great if we can add this issue to 2.0 release plan too.

gnurag avatar Oct 05 '21 19:10 gnurag