Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression #1

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Compression #1

wants to merge 7 commits into from

Conversation

skatkov
Copy link
Collaborator

@skatkov skatkov commented Sep 22, 2023

No description provided.

julik and others added 7 commits September 22, 2023 16:33
For storing cache entries compression can be very beneficial, as most renders from Rails are actually strings with whitespace and all. This allows for pluggable compression methods, with 'plain' and 'gzip' being available by default. If desired, additional compression methods (such as Brotli) can be added later on. The entries will be decompressed with the appropriate decompression algorithm since the compression method gets recorded in the cache entries table, so a switch to compressed entries is both reversible and deployable gradually - without having to delete existing cache data.

The compression method can be specified by adding the `compression:` kwarg when instantiating the Store:

    Store.new(compression: 'gzip')
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.

2 participants