From 333c9df233240a843a9e62d17c6ff464690636f8 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 25 Feb 2026 20:03:09 +0800 Subject: [PATCH] fix(web): refresh memo detail cache after editor save --- web/src/components/MemoEditor/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 2074f90ac..fb75dfe07 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -87,6 +87,11 @@ const MemoEditorImpl: React.FC = ({ queryClient.invalidateQueries({ queryKey: userKeys.stats() }), ]; + // Ensure memo detail pages don't keep stale cached content after edits. + if (memoName) { + invalidationPromises.push(queryClient.invalidateQueries({ queryKey: memoKeys.detail(memoName) })); + } + // If this was a comment, also invalidate the comments query for the parent memo if (parentMemoName) { invalidationPromises.push(queryClient.invalidateQueries({ queryKey: memoKeys.comments(parentMemoName) }));