Skip to content

Commit 7c65990

Browse files
committed
Update more cache invalidation
1 parent c68709a commit 7c65990

File tree

2 files changed

+84
-4
lines changed

2 files changed

+84
-4
lines changed

backend/internal/cache/invalidation.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ func (c *CacheWithRegistry) InvalidateTeam(teamID string) {
202202
c.DeletePrefix("team:" + teamID)
203203
}
204204

205+
// InvalidateSuperTeam invalidates all cache entries related to a super team
206+
func (c *CacheWithRegistry) InvalidateSuperTeam(superTeamID string) {
207+
c.Delete(SuperTeamKey(superTeamID))
208+
c.Delete(TeamsBySuperTeamKey(superTeamID))
209+
c.DeletePrefix("superteam:" + superTeamID)
210+
}
211+
205212
// InvalidateChallenge invalidates all cache entries related to a challenge
206213
func (c *CacheWithRegistry) InvalidateChallenge(challengeID string) {
207214
c.Delete(ChallengeKey(challengeID))

backend/internal/graph/api/schema.resolvers.go

Lines changed: 77 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)