Redis Object Cache
Overview
Redis object cache stores WordPress objects (queries, transients, metadata) in Redis to reduce database load.
Requirements
- Redis server accessible from PHP.
- Write access to
wp-content/(forobject-cache.phpdrop-in). - Write access to
wp-config.php(for Redis constants).
Enable in the UI
- Open ZiziCache Object Cache (Redis).
- Enter connection details (TCP host/port or Unix socket path).
- Optional: set database index, key prefix/salt, and timeouts.
- Optional: set ACL username + password (Redis 6+), or password only.
- Click Test Connection and then enable Redis.
What ZiziCache changes
- Installs
wp-content/object-cache.phpdrop-in. - Writes Redis constants into
wp-config.php(host/port or socket path, database, timeouts, prefix, credentials).
Status and diagnostics
- Status is fetched via REST and uses a Redis
PINGcheck through Predis. - If Redis is disabled in the UI, no connection attempt is made.
WP-CLI
# Flush Redis (uses Predis flushdb) wp zizi-cache redis-flush # Flush object cache (backend-agnostic) wp zizi-cache object-cache-flush
REST API
- GET /wp-json/zizi-cache/v1/redis-status
- POST /wp-json/zizi-cache/v1/redis-flush
Mutual exclusivity
Only one object cache backend can be active at a time. Enabling Redis disables Memcached and vice versa.
Limits and notes
- Predis is bundled with the plugin. If it cannot be loaded, Redis status/flush will fail.
- Configuration is applied via
wp-config.php; changes require file write access.