idealley / feathers-hooks-rediscache

Set of caching hooks and routes for feathersjs.
MIT License
38 stars 12 forks source link

Handling lost connections to Redis server #58

Closed kokujin closed 5 years ago

kokujin commented 6 years ago

I am trying to get these hooks not to crash my application when the connection to the Redis server is lost. According to the docs, I would have to set "no_ready_check": true, to stop the client from checking the status of the connection. This does not work as expected. @idealley, Is there a workaround?

Thanks

SassNinja commented 5 years ago

Is there a workaround?

@kokujin there's no workaround. The problem is there's no error event listener defined in the hook. Therefore redis throws an error and crashes the app.

But you're lucky: I've just submitted a PR that fixes this and makes it safe to use the hook always, no matter if redis is available or not. https://github.com/idealley/feathers-hooks-rediscache/pull/61