This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
feat: WebSocket based implementation of server sent events for cache busting #527
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.
To Do's
What type of PR is this?
What this PR does / why we need it:
This PR implements several layers necessary to properly cache bust the frontend Labels and Locations cache on a mutation made in the database. Procedure works like so.
In the event of a performance problem down the line, we can implement passing data over the WS connection to avoid the extra call, but I don't think we'll every get to that point.
On the backend the Repository Layer will publish mutation events whenever the Locations or Labels tables are updated. It will also provide the GID as a context value.
Which issue(s) this PR fixes:
Fixes #50
Special notes for your reviewer:
Currently in rough draft status, needs another refactor to cleanup code.