volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

AI OnAI Off

GetUsersByGroup Infinite Cache

Hello,

I am developing GetUsersByGroup for my website and I am experiencing the following issue - when I create user from the EPi Community backend and then I try reaching it from code using either userGroup.Users or CommunitySystem.CurrentContext.DefaultSecurity.GetGroupUsers(userGroup) it is not there.

I refactored the GetGroupUsers users and I see there is permanent cache and it is not cleaned up after new user is added to myGroup (IGroup).

How can I go around this - my workflow is:
1. Create user from backend
2. Use it in page, right away

I consider creating my Query to return UserCollection with condition user to have myGroup in his groups - is this a good solution in performance matters?

Steps to repro:

1. Create user from backend
2. Use it in page, right away, getting it by CommunitySystem.CurrentContext.DefaultSecurity.GetGroupUsers
3. You cannot - user is not there

Thank you in advance and have a good one,
Nadya

#65887
Feb 13, 2013 13:24
error This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.