Skip to content

Conversation

kishansinghifs1
Copy link

Description:

This PR ensures that namespace details are correctly evicted from the cache when a member is removed from a namespace.
Previously, when removing a member, the cache was not being cleared, which caused stale data to persist — e.g., the removed user would still appear in the cached namespace details.
The updated method now evicts the namespace details before deleting the membership entity, ensuring cache consistency.

Changes:
Added cache.evictNamespaceDetails(namespace); before entity removal in removeNamespaceMember.
Annotated method with @transactional(rollbackOn = ErrorResultException.class) to maintain consistency on failures.

Why this fix matters:
Prevents stale cache entries after member removal.
Ensures consistency between database and cache.
Improves overall system reliability and data correctness.

Fixes #1185

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.

Cache not invalidated after namespace membership change

1 participant