[PR #1422] [MERGED] Remove the user from the cache without refreshing it #15363

Closed
opened 2026-08-05 03:07:29 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1422
Author: @mlsmaycon
Created: 12/30/2023
Status: Merged
Merged: 1/1/2024
Merged by: @mlsmaycon

Base: mainHead: fix/remove-user-from-cache-on-delete


📝 Commits (1)

  • ffcdfb3 Remove the user from the cache without refreshing it

📊 Changes

2 files changed (+20 additions, -5 deletions)

View changed files

📝 management/server/account.go (+16 -0)
📝 management/server/user.go (+4 -5)

📄 Description

Describe your changes

Some IdPs might have eventual consistency for their API calls, and refreshing the cache with its data may return the deleted user as part of the account

Introduce a new account manager method, removeUserFromCache, to remove the user from the local cache without refresh

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1422 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 12/30/2023 **Status:** ✅ Merged **Merged:** 1/1/2024 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `fix/remove-user-from-cache-on-delete` --- ### 📝 Commits (1) - [`ffcdfb3`](https://github.com/netbirdio/netbird/commit/ffcdfb3caaf121ca4afd83e0e17be01043156df7) Remove the user from the cache without refreshing it ### 📊 Changes **2 files changed** (+20 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+16 -0) 📝 `management/server/user.go` (+4 -5) </details> ### 📄 Description ## Describe your changes Some IdPs might have eventual consistency for their API calls, and refreshing the cache with its data may return the deleted user as part of the account Introduce a new account manager method, removeUserFromCache, to remove the user from the local cache without refresh ## Issue ticket number and link ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 03:07:29 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#15363