Cache modifies view instead of setting #4055
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.
Instead of having the cache maintain the state and using it as the final source of truth, the cache now uses the mod function of a view of the state to update the state when changes arrive. This resolves some UI issues. For example:
Action
would update the UI to the new target in the asterism. However, when thetargetEdit
event for adding the new target came in, it would overwrite the summaries and make that UI state invalid. The subsequent*Edit
events would put the cache in the state where the UI WOULD have been valid, but the UI had already been updated.