multi: Use new container/lru module. #3360
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This requires #3359.This consists of a series of commits to update the code to make use of the new
container/lrumodule as well as deprecate and remove the existing interface-basedlrumodule.In addition to being a bit more efficient, it also has the benefit of using the expiration functionality the new module provides to impose an expiration time of 15 minutes on the known inventory entries for peers. This allows the possibility of the cache shrinking over time in periods of low activity versus the current behavior where it will eventually reach the limit and stay there indefinitely.
Each commit is intended to be a self-contained and logically easy to follow change such that the code continues to compile and the tests continue to pass at each step.
See the description of each commit for further details.