Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cheapest way to cache data in node.js?

I am implementing a node.js server running a matching algorithm. Since I want to keep the server responding as quickly as possible, I would like to be able to retrieve data from a cache instead of querying the database every single time. For example, I need to keep information about 10000 - 50000 users. My fear is that this would take up a lot of RAM. Is there any way to store that much data in a cache without the risk of running out of RAM?

like image 330
user3289157 Avatar asked Aug 15 '26 18:08

user3289157


1 Answers

You can use memcached or redis, who themselves care about memory and its lack removed obsolete data

like image 194
Sergey Avatar answered Aug 18 '26 08:08

Sergey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!