WP LCache is a new persistent object cache drop-in for WordPress that I’ve been working on with the folks at Pantheon.

"But why another object cache drop-in?" you might ask. Because it’s faster than the others, of course.

Under the hood, WP LCache uses LCache, a library that applies the tiered caching model of multi-core processors (with local L1 and central L2 caches) to web applications. In this particular configuration, APCu is the L1 cache and the database is the L2 cache.

APCu is the fastest persistent cache backend you can use, because it exists in PHP memory. However, APCu traditionally can’t be used on multiple web nodes because each node represents a different cache pool. Because WP LCache has a database-based L2 cache, a cache update or delete on one node is then automatically synchronized to all other nodes.

Props to David Strauss for his hard work on the LCache library. Thanks to Steve Persch and Josh Koenig for their help with the WordPress implementation.

Feeling adventurous? Install WP LCache from WordPress.org or Github, and send us feature requests (or bug reports).

Hand Built is Daniel Bachhuber, an effective developer with technology leadership you can trust.

How can I help?

Hit me at daniel@handbuilt.co with a short note about what you'd like to do.

My roots are WordPress and publishing, and I love pretty much everything related to web development (architecture, performance, security, etc.). When not working with clients, I also maintain WP-CLI (WordPress' command line interface) and other open source projects.

Want to connect? I'm on Twitter, Github and LinkedIn. Or, sign up for my TinyLetter for periodic newsletters.