Whenever we need an in-memory cache in Node.js, 99% of us do the exact same thing: npm install lru-cache. It’s muscle memory. LRU (Least Recently Used) has been the industry standard for decades, and for good reason—it’s intuitive and it works.
But if you are running a high-throughput backend, relying on LRU might be quietly bottlenecking your performance and degrading your cache hit ratios.
Recently, I went down a rabbit hole after reading the acclaimed 2023 SOSP paper: "FIFO queues are all you need for cache eviction". The paper proves that a new algorithm called S3-FIFO (using three simple FIFO queues) completely outperforms complex LRU/LFU hybrids. It solves LRU's biggest flaw: Cache Pollution caused by "one-hit wonders" (like a massive DB scan or web crawler traffic knocking out all your hot data).
High-performance storage engines and CDNs outside JavaScript have already adopted S3-FIFO. But the Node.js ecosystem was strangely quiet because we lacked a production-ready, ultra-optimized implementation.
So, I decided to build s3fifo. But I didn't just want to port the algorithm—I wanted to push the V8 engine to its absolute limit.






