feature: node cache/storage expiration #1727
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.
What current issue(s) from Trello/Github does this address?
This PR begins the iterative process of issue/enhancement #1712 - Specifically it adds an expiration to the "best node" algo and also sets an expiration on manually set nodes... This will resolve a number of possible latent issues around the current set up
What problem does this PR solve?
Because nodes could potentially fall behind go offline etc leaving them in memory (or local storage) permanently is generally a bad idea
How did you solve this problem?
node url is set in storage with a timestamp which is always compared to the current time... if its expired the node selection algorithm is run
How did you make sure your solution works?
By manual and automated test coverage
Are there any special changes in the code that we should be aware of?
Is there anything else we should know?