Skip to content

An AI-powered search engine with a generative UI

docs(cache): add comment explaining why general tag is needed for clearChats

Yoshiki Miura57303bc751f8
diff --git a/lib/actions/chat.ts b/lib/actions/chat.ts
index 53709b5e..023f86a3 100644
--- a/lib/actions/chat.ts
+++ b/lib/actions/chat.ts
@@ -232,6 +232,7 @@ export async function clearChats() {
await dbActions.deleteChat(chat.id, userId)
}
+ // Clear all chat caches since we deleted all chats
revalidateTag('chat')
return { success: true }
}