Skip to content

Entries that Mage-OS compresses in Redis reach the local files - #5

Merged
paales merged 1 commit into
mainfrom
compressed-entries
Sep 24, 2026
Merged

paales merged 1 commit into
mainfrom
compressed-entries

Conversation

@paales

@paales paales commented Sep 24, 2026

Copy link
Copy Markdown
Member

Written by 🤖:

Mage-OS 3.5 wraps a Redis frontend with compress_data in its compression decorator: a string above 2 KB is stored packed with the CACHE_COMPRESSION prefix. EntryLifetime compared that packed record with the value the frontend answered, so the comparison failed for every such entry and cache_files promoted none of them: the translations, the EAV attribute preload, the product types, the extension attributes and the GraphQL config stayed a Redis read per request.

The rule unpacks the record the way the decorator does before it compares. Measured on a shop with compress_data on: Redis commands per warm GraphQL request went from 54 to 29, the rest are the bootstrap reads before interception and the version token.

The unit test stores an entry through the decorator and expects its expiry back.

The lifetime rule compared the packed record with the value the frontend answered, so every entry above the compression threshold, among them the translations, the EAV attributes and most config data, stayed a Redis read per request.
@paales
paales merged commit 0b9cc23 into main Sep 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant