masumsoft / express-cassandra

Cassandra ORM/ODM/OGM for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.
http://express-cassandra.readthedocs.io
GNU Lesser General Public License v3.0
228 stars 67 forks source link

before_read hook function needed #223

Open sujonvidia opened 3 years ago

sujonvidia commented 3 years ago

I have used before_save, before_update, before_delete hook functions for caching data to redis in-memory database and it's working great but I need a similar before_read hook function to read data from cache if available. Is there any plan for it or can I add that functionality?

masumsoft commented 3 years ago

There was no plan for it, but as I can understand from your use case, adding before_read seems like a good idea. It would be great if you could try to add the functionality and create a PR.

sujonvidia commented 3 years ago

Thank you very much for your response. I have already implemented before_find hook and it's working. I'll create a PR after also adding after_find hook.

uniqueuser-repo commented 6 months ago

Hi @sujonvidia , have you opened a PR for this?