Caching: Abstraction, Not Optimization

The conventional wisdom is that caching speeds up software. The author argues this is only part of the story. After working with data movement between object storage, disk, and memory, the author posits that caching's more crucial role is simplifying software. The article explores the limitations of pre-baked caching algorithms (LRU, LFU, etc.) and suggests caching acts more as an abstraction layer, hiding the underlying storage details, freeing programmers from worrying about data tier location. Database and OS caching mechanisms exemplify this abstraction. While caching can have issues, like OS page cache and fsync misuse, this doesn't necessitate abandoning caching but rather understanding and using it better.
Read more