Adding Redis or Memcached to a cPanel host is a common “performance optimization” — and a common waste of RAM. Object caches help workloads that hammer the database with repetitive queries. They help nothing if the database isn’t the bottleneck, and they actively hurt if their memory consumption pushes the buffer pool out of RAM.
The trade-off
- Redis — feature-rich (lists, sorted sets, pub/sub, persistence, replication). More memory per cached item. WordPress, Laravel, and most modern PHP frameworks integrate cleanly.
- Memcached — simpler, lighter, key-value only. Lower memory overhead per item. Older PHP applications often default to this.
- No cache — the right answer if database queries aren’t the bottleneck.
What an object cache does: stores the result of expensive computations (database query results, rendered fragments, session data) keyed by something you can look up cheaply next time.
What it doesn’t do: speed up the database itself, fix bad code, or compensate for missing indexes.
How to decide
- Customer is on WordPress, MySQL CPU is the bottleneck, repeat queries dominate? Add Redis. The WordPress object cache + LSCache integration is the canonical case.
- Customer’s database CPU is fine, but PHP CPU is high? Object cache won’t help. The work is in PHP, not the DB.
- Customer’s disk I/O is the bottleneck and the DB working set doesn’t fit in RAM? Tune
innodb_buffer_pool_sizefirst. Adding Redis steals RAM that could go to the buffer pool. - Customer requested Redis specifically? Ask why. If it’s “the plugin says it’s faster”, measure before enabling — many WordPress sites get marginal wins.
- Multi-tenant box, shared Redis? Be careful. One tenant’s cache size can starve another’s. Per-account Redis (different ports/databases) is cleaner but adds operational complexity.
What to do
- Measure before adding. Slow query log +
SHOW STATUS LIKE 'Questions'per second + buffer pool hit ratio tells you whether the DB is the bottleneck. - Default to Redis (not Memcached) for new installs in 2026 — modern PHP frameworks use it preferentially.
- Set
maxmemoryand an eviction policy (allkeys-lruis reasonable for cache use;noevictionfor persistence use). An unbounded Redis can OOM the host. - Per-tenant Redis isolation if multi-tenant: separate Redis ports/sockets per cPanel user, or use Redis ACLs to scope per-user.
- Monitor Redis hit rate. Below 80% hit rate means the cache isn’t effective — either the workload doesn’t suit caching, or the eviction policy is too aggressive.
- Don’t enable Redis “just in case.” Idle Redis eats RAM and adds a service to monitor.
- For Redis-on-cPanel specifics, see the Redis VPS deploy pattern if you’re running it stand-alone, or use the cPanel plugins where supported.
Stack Harbor advises on object cache deployment per workload as part of WHM server management.