Del with using keyPrefix doesn't work as expected
anotheri opened this issue · 1 comments
anotheri commented
Describe the bug
There is no way to easily invalidate prefixed key
How To Reproduce (best to provide workable code or tests!)
- provide
redisStore
withkeyPrefix
param, e.g.pref
- set any value to key
test
, check that it's stored in redis aspref:test
- try to delete with
.del
method using the same keytest
, it won't clean up the storage (b/c it doesn't use keyPrefix for these methods: https://github.com/jaredwray/cache-manager/blob/main/packages/cache-manager-redis-yet/src/index.ts#L116-L121)
I can not see any way to get prefix from store. Is there any appropriate way to handle this scenario?
jaredwray commented
This should be resolved now.