Skip to content

More aggressive points caching#151

Open
nickfreese wants to merge 2 commits into
masterfrom
cache-badges-in-points-calc
Open

More aggressive points caching#151
nickfreese wants to merge 2 commits into
masterfrom
cache-badges-in-points-calc

Conversation

@nickfreese

@nickfreese nickfreese commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
  • 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 refresh and 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:

$config['summergame.settings']['summergame_closed_game_terms'] = [
'SummerGame2023',
'SummerGame2022',
'SummerGame2021',
'SummerGame2020',
'SummerGame2019',
'SummerGame2018',
'SummerGame2017',
'SummerGame2016',
'SummerGame2015',
'SummerGame2014',
'SummerGame2013',
'SummerGame2012',
'SummerGame2011'
];

@nickfreese
nickfreese requested a review from ejk June 30, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant