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

Refactor save/restore functions and disk internals #369

Merged
merged 6 commits into from
Sep 14, 2024
Merged

Refactor save/restore functions and disk internals #369

merged 6 commits into from
Sep 14, 2024

Conversation

whitfin
Copy link
Owner

@whitfin whitfin commented Sep 14, 2024

This fixes #365.

This PR will replace Cachex.dump/3 and Cachex.load/3 with Cachex.save/3 and Cachex.restore/3. At the same time all internals have been rewritten to provide a more memory efficient implementation when possible, with a focus on streaming. The Cachex.export/2 function has also been modified to use Cachex.stream/3. Due to all of these changes, Cachex.Disk has also been completely removed.

Compression has been removed as an option, instead using Elixir's GZIP compression directly. The :trusted option has been renamed to :trust, even though I imagine people aren't setting this directly.

This PR also fixes a couple of bugs inside option parsing as well as streams.

@whitfin whitfin added this to the v4.0.0 milestone Sep 14, 2024
@whitfin whitfin self-assigned this Sep 14, 2024
@whitfin whitfin linked an issue Sep 14, 2024 that may be closed by this pull request
@whitfin whitfin merged commit e81dc03 into main Sep 14, 2024
16 checks passed
@whitfin whitfin deleted the issue-365 branch September 14, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache imports should return the number of imported records Test new approaches for persisting caches to disk
1 participant