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

Add a new :wait option to control Cachex.warm/2 #342

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Add a new :wait option to control Cachex.warm/2 #342

merged 1 commit into from
Mar 26, 2024

Conversation

whitfin
Copy link
Owner

@whitfin whitfin commented Mar 25, 2024

This fixes #336.

This PR adds a new option :warm to the Cachex.warm/2 command which allows the user to specify whether they want to wait for all warmers to complete, or spawn the warming asynchronously.

This also allows us to re-use Cachex.warm/2 in the cache startup sequence, instead of re-implementing warming details there. The implementation now uses Task, which I'm not totally sure about, but I think it's better than running synchronous warmers one by one.

@whitfin whitfin added this to the v4.0.0 milestone Mar 25, 2024
@whitfin whitfin self-assigned this Mar 25, 2024
@whitfin whitfin merged commit 4a87f33 into main Mar 26, 2024
15 checks passed
@whitfin whitfin deleted the issue-336 branch March 26, 2024 04:26
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.

Cachex.warm/2 should be able to flip between blocking vs. non-blocking
1 participant