Skip to content

Commit

Permalink
fix: bad cache
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Jul 19, 2023
1 parent 9f9db71 commit b232674
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/trpc/routers/survey/survey.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ export const surveyRouter = router({
data: input,
})

await ctx.cache.surveys.setItem(survey.id, survey)
await Promise.all([
ctx.cache.surveys.setItem(survey.id, survey),
ctx.cache.surveys.removeItem(ALL_SURVEYS_KEY),
])

return survey
}),
Expand Down

0 comments on commit b232674

Please sign in to comment.