Adobe Commerce Developer Expert study materials
Adobe Commerce Developer Expert study resources

Redis Cache Growth After Enabling Page Cache

Adobe Commerce Developer Expert · Put your knowledge to work in context.

All case studies

Redis Cache Growth After Enabling Page Cache

After enabling the full-page cache backed by Redis, the Redis instance grows from 2 GB to 14 GB within two days and hits its maxmemory limit, causing evictions and intermittent cache misses. The catalog has 300 categories × 12 store views = 3,600 listing pages, plus ~50,000 product pages. The team set the FPC TTL to 7 days. Redis is also used for the default cache and session storage on the same instance. maxmemory-policy is allkeys-lru. During the incident, checkout sessions were dropped.

1. Diagnose the memory growth and the dropped sessions.

Read the worked answer

Full-page cache stores a serialized page per URL per store view per customer group/currency context, so 50,000 products × multiple store views plus 3,600 listings plus layered-navigation permutations can far exceed raw page counts. A 7-day TTL means entries persist long after they are useful, and layered navigation (filters, sort, pagination) multiplies keys per listing. 14 GB is plausible.

Sessions dropped because sessions, default cache, and FPC share one Redis instance with allkeys-lru: under maxmemory pressure Redis evicts any key, including session keys. Sessions must never be evicted, so sharing an LRU instance with cache is the root cause of the checkout failures.

2. Propose a remediation covering isolation, eviction policy, and TTL.

Read the worked answer

Separate Redis usage: dedicated instances (or at least separate logical databases with distinct policies) for sessions vs. cache. Sessions need maxmemory-policy noeviction (or a policy that never evicts session keys) and persistence; cache can use allkeys-lru. This alone prevents checkout session loss.

For the FPC: reduce TTL to a realistic value (hours, not 7 days) and rely on tag-based invalidation from catalog saves rather than long TTLs. Configure FPC in env.php under cache with its own Redis backend and database number, distinct from the default cache and sessions. Monitor key count and memory; if layered navigation blows up keys, consider disabling FPC for filtered URLs or normalizing the cache key. Re-test that a product save still purges dependent listing pages.