Persistent object caches are like a fine wine paired with steak

A quote I put together for an upcoming Pantheon whitepaper on scaling WordPress.

Used appropriately, a persistent object cache like Redis or Memcached can be an incredibly helpful tool for scaling your WordPress site.

Say, for instance, you have an unavoidable query which takes an entire second to run. Or, you need to make an API request to a service that’s notoriously slow. You can mitigate the performance impact in both cases by storing the result of the operation in the persistent object cache, and then using the stored reference when render your response.

Like a fine wine with steak, persistent object caches like Redis or Memcached are best paired with complex data generation. They provide a useful way to store computed data that was expensive to create, and don’t make sense to waste on a cheap meal.

Leave a Reply