What’s the best way to manage a large memory cache in JavaScript without crashing?

0
5
Asked By TechieNinja99 On

I'm currently working on a backend project where I'm caching database data in memory when starting up. The data I'm dealing with could amount to millions of records, and each record can have as many as 10 million entries. As the data grows, I'm really concerned about hitting memory limits and crashing my VPS. I'm running on a setup with 4 GPUs, 16GB of RAM, and a 200GB NVMe SSD. Is storing all this in memory a bad idea? If it is, what would be a better solution to cache millions of records without causing issues in JavaScript?

2 Answers

Answered By William Rossbach On
Answered By CleverCoder On

Caching everything in memory isn't ideal for various reasons, including longer startup times and stale data. Using a dedicated caching service like Redis is much more efficient.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.