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
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
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically