docs(redis): explain cache tag keys without TTL filling Redis#2362
docs(redis): explain cache tag keys without TTL filling Redis#2362Soner (shyim) wants to merge 4 commits into
Conversation
The redis_tag_aware adapter stores tag-index sets without a TTL. Under high cache churn these accumulate orphaned entries that volatile-lru can never evict, eventually starving the cache Redis of evictable data and causing OOM errors despite a correct eviction policy. Adds a junior-friendly section to the caches guide (TTL/eviction primer, a before/after walkthrough, a redis-cli diagnosis, and a scheduled-cleanup fix via FroshTools or shopware-redis-cli-helper), plus a cross-linked warning in the infrastructure Redis guide.
Developer Docs healthcheckStatus: Completed with |
There was a problem hiding this comment.
Pull request overview
Adds operational documentation to help operators diagnose and prevent Redis OOM conditions caused by persistent (no-TTL) tag-index keys created by Symfony/Shopware’s tag-aware Redis cache adapter, and cross-links the guidance from the Redis infrastructure page. Also updates the spellcheck allowlist for newly introduced terms.
Changes:
- Added a new section explaining how tag-index sets without TTL can accumulate and prevent
volatile-lrufrom freeing memory. - Added a warning callout in the Redis “Ephemeral data” section linking to the new cache-tag guidance.
- Added
OOMandevictableto.wordlist.txtfor spellcheck.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| guides/hosting/performance/caches.md | Adds a new “Cache tags and keys without a TTL” section with diagnosis and cleanup guidance. |
| guides/hosting/infrastructure/redis.md | Adds a warning callout about no-TTL tag-index keys and links to the cache-tag section. |
| .wordlist.txt | Adds OOM and evictable to the spellcheck wordlist. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Thx for the PR Soner (@shyim) 👍 I believe this is very helpful for understanding the quirks of a key-value cache. Often, it is a black box to many, and we should keep documenting like this 💯 |
Summary
Documents a real customer case: a cache Redis that kept running out of memory even though
volatile-lruwas configured correctly.redis_tag_awarecache adapter stores a tag index in Redis (one set per cache tag) so related entries can be invalidated together. These tag-index keys have no TTL.volatile-lruonly evicts keys with a TTL, these persistent sets accumulate and can never be evicted — under high cache churn Redis eventually has too little evictable data left and returns OOM errors.Changes:
guides/hosting/performance/caches.md— new self-contained section "Cache tags and keys without a TTL", written for a junior dev/DevOps reader: a TTL + eviction primer, a before/after walkthrough of how orphaned tags accumulate, aredis-cli INFO keyspaceself-diagnosis, and a scheduled-cleanup fix.guides/hosting/infrastructure/redis.md— a cross-linked warning in the ephemeral-data section wherevolatile-lruis recommended..wordlist.txt— addedevictableandOOM.Related links
frosh:redis-tag:cleanup) and shopware-redis-cli-helper.Checklist
PageRefreferences where relevant..gitbook.yamlif pages were moved, renamed, or deleted..wordlist.txt(and sorted it) if spellcheck flags new legitimate terms.Notes
shopware-redis-cli-helpercurrently lives under a personal GitHub account. If linking a personal repo from official docs is undesirable, I can drop it and keep only the FroshTools reference.