idealley / feathers-hooks-rediscache

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

bugfix (be07cde) and possibility to configure redis settings (d267c76) #9

Closed juckerf closed 7 years ago

juckerf commented 7 years ago

commit be07cde fixes an issue when hook.params is empty (and therefore hook.params.query cannot be converted into an object)

commit d267c76 fixes #2 partially. Partially because I was not able to pass the redisClient to the cache routes. Probably if one migrates the express routes to a feathers service, one can add a .setup(app) method to the service and get the redisClient from there.

juckerf commented 7 years ago

commit 43d75d1 adds a new hook which can be used as after hook to remove the hook.result.cache property from the final result.

(i just saw that travis failed, probably i'm gonna adjust the tests for commit d267c76)

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-2.5%) to 72.626% when pulling bf9d33711157ee2f719c4c428aeea1b3760b1764 on juckerf:master into 42eb3b9e59f2430e6edc3c998d0a0354a48475f6 on idealley:master.

idealley commented 7 years ago

Thank you for this nice addition. I will bump the npm version as it is now a little different to use.

idealley commented 7 years ago

Probably if one migrates the express routes to a feathers service, one can add a .setup(app) method to the service and get the redisClient from there.

Services have very strict routes with precise verbs: find, get, patch, etc. How do you see this? the express route on the other hand is perfectly flexible... Maybe using a post object submited to find method? or params?