Caching in WordPress: Invalidation Schemes

If you do any reading about caching you will undoubtedly come across the following quote frequently attributed to Phil Karlton: “There are only two hard things in Computer Science: cache invalidation and naming things.” When writing WordPress applications, this certainly holds true. In my talk, I would like to discuss techniques for regenerating and invalidating cached objects. With WordPress’ transients API and WP_Object_Cache class, it is a breeze to cache data; however, without a consideration of how that data will be updated, it can be difficult to develop a robust application that can handle constantly changing data. I plan to discuss topics that include: invalidating groups of data, when to invalidate, and avoiding “race conditions.”

Accompanying article