Many developers agree with Phil Karlton’s observation that “there are only two hard things in Computer Science: cache invalidation and naming things.” To make the former easier, Facebook has OSS’ed CacheLib, an embedded caching engine designed to help developers build and scale high-performance caching services. Historically, developers designed caching systems specialized to particular applications and/or hardware. However, Facebook engineers saw an opportunity to extract a core set of common requirements and capabilities when building CacheLib. CacheLib, which powers more than 70 large-scale systems at Facebook, including social graph and CDN, provides a thread-safe API that enables developers to create caching implementations for different hardware backends and use cases.