refactor: use better cache policy to show newly created tags #5978
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.
Resolves #5949
Impact: minor
Type: bugfix|refactor
Issue
New tags are not showing up in the tags table in the admin, until the page is refreshed
Solution
Update the query that retrieves the tags to get data from the network, in addition to the cache.
cache-and-network will use the cache first, so the page will load with the previous data, and then immediately update with new data. This query will not be hit consistently on the customer side, only sparingly on the admin side, so the performance hit that will occur from loading via the network shouldn't be noticeable.
Breaking changes
None
Testing