Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions hooks/useBookStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ export function invalidateBookQueries(queryClient: QueryClient, bookId: string):
queryClient.invalidateQueries({ queryKey: queryKeys.dashboard.all() });
queryClient.invalidateQueries({ queryKey: queryKeys.library.books() });
queryClient.invalidateQueries({ queryKey: queryKeys.readNext.base() });

// Invalidate series pages (if book belongs to a series)
queryClient.invalidateQueries({ queryKey: queryKeys.series.all() });

// Invalidate shelves containing this book
// Try to get shelves from cache; if available, invalidate only those shelves (surgical)
Expand Down
1 change: 1 addition & 0 deletions lib/services/progress.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ export class ProgressService {
revalidatePath("/stats"); // Stats page
revalidatePath("/journal"); // Journal page
revalidatePath(`/books/${bookId}`); // Book detail page
revalidatePath("/series"); // Series pages (list and detail)
} catch (error) {
getLogger().error({ err: error }, "[ProgressService] Failed to invalidate cache");
// Don't fail the request if cache invalidation fails
Expand Down
1 change: 1 addition & 0 deletions lib/services/session.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,7 @@ export class SessionService {
revalidatePath("/stats"); // Stats page
revalidatePath("/journal"); // Journal page
revalidatePath(`/books/${bookId}`); // Book detail page
revalidatePath("/series"); // Series pages (list and detail)
} catch (error) {
getLogger().error({ err: error }, "[SessionService] Failed to invalidate cache");
// Don't fail the request if cache invalidation fails
Expand Down
Loading