Your app slows — someone proposes Redis "because everyone uses Redis". Actually you cache HTML fragments TTL 60 s. Memcached would do the job with less RAM and zero persistence ops. Elsewhere you need distributed rate limiting — Memcached is not enough.
Wrong cache costs RAM, complexity and incidents — not licence fees.
Problem → tool
| Need | Memcached | Redis |
|---|---|---|
| HTML fragment cache | ✓ excellent | ✓ ok |
| PHP sessions | ✓ | ✓ |
| WP/Laravel object cache | Possible | ✓ standard |
| Job queue | ✗ | ✓ lists/streams |
| Pub/sub | ✗ | ✓ |
| Structures (sorted set) | ✗ | ✓ |
| Transactions | ✗ | ✓ limited |
Memcached = optimised cache hammer. Redis = swiss army knife — sometimes oversized.
Behaviour under load
Memcached: multi-thread, simple LRU eviction, no persistence — restart = acceptable cold cache.
Redis: single-thread (mostly), rich commands, optional AOF/RDB — risk of becoming accidental source of truth.
Hosting
Shared: rarely dedicated Redis/Memcached — file cache plugins.
VPS: Redis on localhost; never public firewall 6379.
Managed: cloud Redis (ElastiCache, Scaleway) if multi-instance app — managed Memcached less common today.
Size TTL and invalidation — stale cache = silent bugs.
Anti-patterns
- Redis persistence ON for disposable cache → useless I/O.
- Memcached for queue → fragile workarounds.
- Cache without hit rate metrics → blind optimisation.
- Same Redis for cache and critical data without logical DB separation.
The climax: cache that solves your problem is simplest that holds load
One business sentence is enough to decide.
Decide and move forward without blind spots
- Write problem in one sentence (sessions? fragments? queue?).
- Measure hit rate before adding cache tier.
- Isolate Redis cache vs queue instances if using both.
- Compare managed Redis hosts via compare tool.
Frequently asked questions
Is Memcached enough for PHP sessions?
Yes for pure session; Redis if queues/locks too.
Redis as WordPress object cache?
Standard with Object Cache Pro; WP ecosystem Redis-oriented.
Persistent Redis, good idea?
No for pure cache; yes only for non-rebuildable data.
How much RAM on hosting?
10–20% hot data; dedicated Redis 512 MB–1 GB on 4 GB VPS.
Redis or Memcached: right cache is not the trendiest — it is the one matching one problem sentence, not a trendy stack.
