Understanding WordPress's Three Caching Layers: Page Cache, Object Cache, and OPcache
Many WordPress maintenance problems arise because people treat several different caches as a single "cache," when a site actually has at least three distinct layers. The page cache stores finished HTML so repeat requests can skip PHP and database work almost entirely, though it is unsuited to per-visitor content and can serve stale pages after updates. The object cache holds results of database queries and option values, with WordPress's built-in version lasting only for a single request, while a persistent object cache backed by Redis or Memcached keeps values across requests. OPcache, PHP's shared-memory store of compiled code, avoids re-reading and re-parsing PHP files but does not prevent PHP from running. Because each layer stores different data and is cleared differently, identifying which one is responsible is essential when troubleshooting.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in