This week in caching: a clean Redis object-cache install for WordPress
The order that saves you a debugging weekend. Skip if you already run a managed object cache.
— Provision before plugins — install php-redis (PhpRedis, not Predis) and confirm redis-cli ping returns PONG; the extension is 2-3x faster than the userland client.
— Drop-in, not plugin-only — Redis Object Cache writes wp-content/object-cache.php; if it's missing, persistent caching silently never turns on.
— Namespace by site — set a unique WP_CACHE_KEY_SALT per install so two sites on one Redis box don't read each other's keys.
— Cap and evict — set maxmemory plus allkeys-lru; an unbounded object cache OOMs the box at the worst moment.
— Verify the hit ratio — the plugin's diagnostics should show 90%+ hits within an hour, else your salt or DB is churning keys.
Bookmark: Till Krüss's Redis Object Cache docs — the canonical reference, and he wrote the drop-in.
Cache Catch
@CacheCatch
This week in caching: a clean Redis object-cache install for WordPress
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.