fix: inverted tag expiration in Redis handler + saveItemOptions board name
- Fix critical bug: tag expiration comparison was inverted (< should be >) in Redis cache handler, which would prevent revalidateTag from clearing stale entries - Pass board name to invalidateBoardCache in saveItemOptions - Add clarifying comment about two-tier invalidation helpers
This commit is contained in:
3 files changed
+12
-2
No files matched your search
@@ -53,6 +53,10 @@ export const optionsRouter = createTRPCRouter({
|
||||
.set({ options: SuperJSON.stringify(options) })
|
||||
.where(eq(items.id, input.itemId));
|
||||
|
||||
invalidateBoardCache(input.boardId);
|
||||
const board = await ctx.db.query.boards.findFirst({
|
||||
where: eq(boards.id, input.boardId),
|
||||
columns: { name: true },
|
||||
});
|
||||
invalidateBoardCache(input.boardId, board?.name);
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user