Skip to content

Only cache responses when the endpoint returns all data at once#1039

Merged
aine-etke merged 2 commits intomainfrom
fix-users-media
Feb 8, 2026
Merged

Only cache responses when the endpoint returns all data at once#1039
aine-etke merged 2 commits intomainfrom
fix-users-media

Conversation

@beastafk
Copy link
Copy Markdown
Contributor

@beastafk beastafk commented Feb 8, 2026

(e.g., joined_rooms, room_members, room_state, pushers, memberships). For endpoints with server-side pagination (e.g., users_media, devices, destination_rooms), skip caching and use the API response directly

Fixes #1038

beastafk and others added 2 commits February 8, 2026 20:19
(e.g., joined_rooms, room_members, room_state, pushers, memberships). For endpoints with server-side pagination (e.g., users_media, devices, destination_rooms), skip caching and use the API response directly,

Co-Authored-By: Claude Opus 4.6 <[email protected]>
When rooms are deleted from User's View -> Rooms tab, the getManyReference
cache for joined_rooms was not being invalidated, causing the table to show
outdated data.

This fix:
- Adds lifecycle callbacks for rooms resource to invalidate joined_rooms
  cache after delete/deleteMany operations
- Handles 404 errors gracefully in getMany for rooms that were deleted but
  still referenced (returns minimal data instead of throwing)
@aine-etke aine-etke merged commit 2c367f3 into main Feb 8, 2026
3 checks passed
@aine-etke aine-etke deleted the fix-users-media branch February 8, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Media pagination broken in User → Media

2 participants