Skip to content

fix: flush user group cache when users are added during group creation - #4903

Open
Cynthia-0203 wants to merge 1 commit into
koderover:mainfrom
Cynthia-0203:fix/user-group-create-cache-flush
Open

fix: flush user group cache when users are added during group creation#4903
Cynthia-0203 wants to merge 1 commit into
koderover:mainfrom
Cynthia-0203:fix/user-group-create-cache-flush

Conversation

@Cynthia-0203

@Cynthia-0203 Cynthia-0203 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What this PR does / Why we need it:

Invalidate user group caches when creating a user group with members. Otherwise, users with an existing cache may not receive the new group permissions until the cache expires.

What is changed and how it works?

After the user group and its bindings are committed to the database, the user_group_{uid} cache is deleted for each member. A second deletion is scheduled after 2 seconds to handle concurrent requests that may repopulate stale cache data.

Does this PR introduce a user-facing change?

  • API change
  • database schema change
  • upgrade assistant change
  • change in non-functional attributes such as efficiency or availability
  • fix of a previous issue

This change is Reviewable

Signed-off-by: Cynthia <chenchen@koderover.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants