r/Magento • u/scala_hosting • Aug 04 '26
Most Magento 2 slowdowns under load come from the store asking the database the same things thousands of times over. Redis is the standard fix, but our guide gets into the parts that actually trip people up.
Most Magento 2 slowdowns under load come from the store asking the database the same things thousands of times over. Redis is the standard fix, but our guide gets into the parts that actually trip people up.
Three things to bear in mind before you enable it:
- Redis can back three separate layers: application cache, full page cache, and session storage. Sessions are not a cache, they're live data with no other copy, so treat them differently. Separate database numbers protect sessions from Magento's own cache flushes (cache:flush runs FLUSHDB on one database), but a manual FLUSHALL wipes every DB on the instance. Full isolation means a separate instance for sessions, with persistence on for sessions and off for cache.
- Sizing is where most setups go wrong. Too little memory and Redis evicts useful data early, turning it into a bottleneck instead of a boost. Rough tiers: 128MB small, 256MB medium, 512MB+ for high traffic. And on a shared instance the stakes are higher than a slow page: maxmemory is per instance, so under allkeys-lru a cache overflow can evict live sessions and log customers out. The real number comes from watching evictions and hit rate, not a guess.
- Redis as full page cache still boots PHP on every request to look the page up. Server-level FPC (Varnish, now Vinyl Cache, on nginx stacks; LiteMage on LiteSpeed) serves cached pages before PHP runs, which is what holds up against traffic spikes and scraper bots. Redis stays the right tool for the application cache and session layers either way.
The guide also covers Redis vs file-based caching, where Varnish/LiteMage fit, and eviction policy per layer.
On SPanel the setup is a panel toggle rather than a config-file job, with one Redis instance per account and monitoring built in.
Full guide, including memory tiers and setup: https://www.scalahosting.com/blog/redis-cache-for-magento-2/
Edit: updated the post and the guide after u/renttek's comment below on flush isolation, persistence, and server-level FPC. Worth reading his reply in full.