caching

  • Query cache is gone in 8.0, and was already a mistake

    The query cache stores result sets keyed by the exact query text and invalidates every entry for a table whenever that table is written. On anything with writes,…

  • Read models can be stale and must say so

    A projection updated asynchronously is behind by some amount, usually milliseconds and occasionally minutes. Hiding that from the caller makes every consumer assume it is current, and one…

  • wp_cache_get with the found flag

    A cached value of false and a cache miss both return false, so a lookup that legitimately caches “no result” re-queries on every request and the cache appears…

  • A filter context does not score, and is cached

    Every clause in a query context computes a relevance score, including the ones that are yes-or-no questions — in stock, in this category, under this price. Scoring them…

  • A persistent object cache changes what transients mean

    Without a drop-in, a transient is two rows in wp_options. With one, transients are stored in the object cache and never touch the database — which is faster…

  • HTTP caching headers the application controls

    A reverse proxy or CDN caches what the response tells it to cache, which means the decision belongs in the application and usually is not made at all…

  • The REST API in core, and the plugin it replaces

    4.7 shipped the content endpoints. What moving off the feature plugin involves, why authentication is still the unsolved half, and the read API every site now exposes.

  • A transient with an expiry of zero never expires

    Passing 0 as the expiry reads like “expire immediately” and means the opposite: no expiry is stored, so the transient lives until something deletes it. A variable that…

  • Redis beyond caching: locks, counters and rate limits

    The cache server was already there doing one job out of four. A lock that expires, a release that checks it still owns the lock, and a sliding-window…

  • Enable gzip for JSON responses in nginx