Skip to content

Commit 3f3cdc4

Browse files
committed
Update cache invalidation
1 parent 9fc5de8 commit 3f3cdc4

29 files changed

+1189
-79
lines changed

backend/internal/cache/invalidation.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,15 @@ func (c *CacheWithRegistry) InvalidateSuperTeam(superTeamID string) {
236236
}
237237

238238
// InvalidateChallenge invalidates all cache entries related to a challenge
239-
func (c *CacheWithRegistry) InvalidateChallenge(challengeID string) {
239+
func (c *CacheWithRegistry) InvalidateChallenge(challengeID, projectID string, eventID *string) {
240240
c.Delete(ChallengeKey(challengeID))
241241

242+
// Invalidate challenge list caches for project and event
243+
c.Delete(ChallengesByProjectKey(projectID))
244+
if eventID != nil {
245+
c.Delete(ChallengesByEventKey(*eventID))
246+
}
247+
242248
// All challenge list/filter queries (any filter combination)
243249
// These are invalidated globally since filter query cache keys are hashed
244250
c.DeletePrefix(PrefixChallengesFilter)

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

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

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

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

yaak-workspace/yaak.rq_8gxK7RqpaW.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,26 @@ type: http_request
22
model: http_request
33
id: rq_8gxK7RqpaW
44
createdAt: 2025-12-13T17:40:10.683519
5-
updatedAt: 2025-12-13T17:41:04.851186
5+
updatedAt: 2025-12-14T20:32:07.431588
66
workspaceId: wk_XKsmbMdFg7
77
folderId: fl_U4FqjQ2Ma5
88
authentication: {}
99
authenticationType: null
1010
body:
11-
query: "mutation {\n createChallenge(input:{\n type: \n }){\n id\n }\n}\n"
11+
query: |
12+
mutation {
13+
createChallenge(input:{
14+
type: QUIZ
15+
name: "Heartbeat Quiz"
16+
description: "A quiz to play during Heartbeat"
17+
buttonText: "Join now!"
18+
requiresTeamMembership: false
19+
requiresSuperTeamMembership: false
20+
}, projectId: "PR01K9VZ8684DP9R4W3ZEV526E5X",
21+
eventId: "EV01KCF9091B68644DTZTHZVDVGJ"){
22+
id
23+
}
24+
}
1225
variables: ''
1326
bodyType: graphql
1427
description: ''

0 commit comments

Comments
 (0)