Optional callbacks. Incompatible with memory backend.
Closed this issue · 3 comments
There are certain methods like delete, where callbacks is not very useful. We use those apis as fire and forget. When we switched to redis backend from memory backend, we noticed tons of error upon delete keys. This required us to fork the code to make callbacks conditionally wrapped in if(cb).
/sites/pivhub.com/app/node_modules/cache-manager-redis/index.js:53
cb(null, result);
^
TypeError: undefined is not a function
at Command.callback (/sites/pivhub.com/app/node_modules/cache-manager-redis/index.js:53:7)
at RedisClient.return_reply (/sites/pivhub.com/app/node_modules/cache-manager-redis/node_modules/sol-redis-pool/node_modules/redis/index.js:606:25)
at /sites/pivhub.com/app/node_modules/cache-manager-redis/node_modules/sol-redis-pool/node_modules/redis/index.js:309:18
at process._tickDomainCallback (node.js:459:13)
A worker process died, restarting...
Thanks @santoshsahoo. I'll check this out soon.
@santoshsahoo I have fixed the issue and push a new version v0.1.12 to npm.
Hope this helps