MongoDbCache icon indicating copy to clipboard operation
MongoDbCache copied to clipboard

It does not delete expired cache, and don’t take into account configuration

Open sirdawidd opened this issue 1 year ago • 1 comments

So it adding records but it doesn’t take into account global cache timeouts only it works when I put configuration object into set method. Global timeouts completely not working. However main issue is that frequently it doesn’t delete old cache just it updates timestamp, and this is completely random.

sirdawidd avatar Apr 25 '24 07:04 sirdawidd

Please provide a minimal example to help reproduce both issues.

The deletion happens in separate fire & forget task, it seems in your case it gets killed for some reasons. However now this can be offloaded to MongoDB by using TTL indexes, and I'm planning to do this change really soon. Apart from not deleting old keys, is it reusing expired ones? Because that should not happen for sure.

petrhaus avatar Apr 25 '24 08:04 petrhaus