Skip to content

Cache notification unread counter#19559

Open
krauselukas wants to merge 2 commits intoopenSUSE:masterfrom
krauselukas:refactoring/cache_notification_unread_counter
Open

Cache notification unread counter#19559
krauselukas wants to merge 2 commits intoopenSUSE:masterfrom
krauselukas:refactoring/cache_notification_unread_counter

Conversation

@krauselukas
Copy link
Copy Markdown
Contributor

@krauselukas krauselukas commented Apr 10, 2026

We render the unread count value of notifications everywhere in the webui
in the navigation bars, to indicate how many notifications a user
received. So every page load in OBS hits the database and performs a
count over the notifications.
By caching the value, we can safe a lot of database queries.

image

We render the unread count value of notifications everywhere in the webui
in the navigation bars, to indicate how many notifications a user
received. So every page load in OBS hits the database and performs a
count over the notifications.
By caching the value, we can safe a lot of database queries.
To avoid silent and frustrating bugs due to stale cache entries,
adding some specs to ensure the cache for the unread notifications
count of a user gets deleted after they get marked as read or unread.
@krauselukas krauselukas added the Frontend Things related to the OBS RoR app label Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend Things related to the OBS RoR app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant