-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: cross-node cache warming #1875
Conversation
0670527
to
4825040
Compare
Commenting for comms but lets wait on this one. Lots of edge cases to consider. |
end | ||
end) | ||
|> Enum.filter(&(&1 != nil)) | ||
|> Enum.sort_by(&Atom.to_string/1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC Atom.to_string
call is not needed, as it is default behaviour of comparing atoms.
end) | ||
|> Enum.filter(&(&1 != nil)) | ||
|> Enum.sort_by(&Atom.to_string/1) | ||
|> List.first() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorting and then fetching first is the same as finding minimum.
|> Enum.filter(&(&1 != nil)) | ||
|> Enum.sort_by(&Atom.to_string/1) | ||
|> List.first() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|> Enum.filter(&(&1 != nil)) | |
|> Enum.sort_by(&Atom.to_string/1) | |
|> List.first() | |
|> Enum.filter(&(&1 != nil)) | |
|> Enum.min(&<=/2, fn -> nil end) |
Closing this, as:
|
This PR adds cross-node cache warming to Cachex caches.
Possible future extensions: