I am writing REST APIs in Node.js with Sequelize as ORM npm, to manage my data models.
I am concerned about my APIs performance because there are many clients, will be using same API, so I want to implement caching mechanism in Sequelize ORM.
Would it be possible with Sequelize ORM ? if yes How ?
I am writing REST APIs in Node.js with Sequelize as ORM npm, to manage my data models.
I am concerned about my APIs performance because there are many clients, will be using same API, so I want to implement caching mechanism in Sequelize ORM.
Would it be possible with Sequelize ORM ? if yes How ?
Share Improve this question edited Jan 6, 2016 at 9:42 Sunil Sharma asked Jan 6, 2016 at 7:52 Sunil SharmaSunil Sharma 1,3153 gold badges17 silver badges31 bronze badges 02 Answers
Reset to default 6You can use caching layers like Redis or Memcached to store your results, if you have big ammounts of data. Here is a parison between these two Memcached vs. Redis?.
Also there is sequelize-redis-cache
npm package you can use https://github./rfink/sequelize-redis-cache
If you are using Sequelize 4, check out that module:
https://github./idangozlan/sequelize-redis
It's a full solution for caching + invalidating cache easily, and as much as I know it's the only Sequelize 4 caching module (right now).
Disclaimer: I'm the author of that module and I'm using that on production for daily traffic of 1m unique users.