More aggressive points caching#151
Open
nickfreese wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds badge caching. Previously the badge data was loaded from scratch every time, now it follows the same pattern as the points, and layers in new badges on top of the cache response.
Allows for a list of “closed“ game terms in settings.php. These closed game terms are cached in redis with no expire time and will be used when the regular redis points cache is expired. This cache is only hit when the regular cache has expired. Its implemented similar to the regular cache but instead of loading everything else after its timestamp, it loads everything that doesn't match the closed game term list.
To clear both the closed game term cache and the regular points cache, a player page can be loaded with the query parameter
refreshand points will be recalculated from scratch, and the caches will be filled. @ejk are there specific actions that we'd want to trigger recalculation or deleting the points caches for a player?Closed game terms are defined in the settings.php file like so: