sarkistlt / feathers-redis-cache

Set of Redis caching hooks and routes for feathersjs.
12 stars 19 forks source link

Cache not getting cleared consistently for groups #25

Open earamizu opened 3 years ago

earamizu commented 3 years ago

We're using groups to store our keys and then use these groups to delete keys in batches.

It seems that due to this line of the purgeGroup function it might be returning a false negative result, scan returns an empty list for some cases that there are keys present for a given group.

Here is an example of this happening, when we used RedisInsight:

thngdude commented 2 years ago

I'm experiencing the same. Did you resolve this on your end?

earamizu commented 2 years ago

@thngdude We actually ended up forking it and just adjusting that line of the code.

sarkistlt commented 2 years ago

@earamizu if you'll submit PR I'll merge it.

Thanks

earamizu commented 2 years ago

@sarkistlt Sorry for the late reply. I don't think what I ended up doing is an actual fix worth merging, as I really just increased the limit, which has been working fine for our use cases but that wouldn't be ideal for everyone else.