add admin area for one-off global cache invalidations #105
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.
closes #101
What I Did
Certain tags weren't showing up on recipes. When I looked into why this is it seems like is a caching issue:
When recipes are edited, the cache for the edited recipe pages needs to be revalidated. When it is not, the tags never show up because the stale page is sent instead.
This is something I already added to recipe edits a while back. The issue now is that if a recipe was last edited before this bug was fixed, those edits will never show up without a new edit.
This change adds an admin page with a button to invalidate all caches. This will allow the caches to be reset and prevent pages from being stale. Since cache revalidation is built in to edits now this should not be necessary more than once unless another mistake is made further down the road.