admin管理员组文章数量:1402398
So my question is very simple. If I will perform the same query a lot of time per second/minutes (like User.find(test_user_id)) it will send request to database each time or it's just cache query result somehow?
So my question is very simple. If I will perform the same query a lot of time per second/minutes (like User.find(test_user_id)) it will send request to database each time or it's just cache query result somehow?
Share Improve this question asked Feb 15, 2014 at 22:39 Ph0en1xPh0en1x 10.1k8 gold badges55 silver badges97 bronze badges 1- Sequelize doesn't do any DB caching, but I love this module for Redis cache npmjs./package/sequelize-redis-cache – Mustafa Magdi Commented Apr 20, 2015 at 13:39
1 Answer
Reset to default 4In your example, User.find(test_user_id), User is the database table model you are querying and .find is your data retrieval method. From the sequelize site the finder method is defined as follows:
"Finder methods are designed to get data from the database."
If you call User.find(...) you will be querying your database for each query request.
本文标签: javascriptDoes sequelize cache common requestsStack Overflow
版权声明:本文标题:javascript - Does sequelize cache common requests - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744272697a2598260.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论