cancel
Showing results for 
Search instead for 
Did you mean: 

Delay in User Administration actions

Anthony_Boyd
Star Collaborator
Star Collaborator

Hi,

We have been using the UnityAPI for some time to do user administration tasks (lock/unlock/add to group, create account, etc).  Since upgrading to OnBase 14 we have noticed that there is a delay when doing these tasks.  ie: If I create a new account through the Unity API  and then try and go back to access that account I get an exception that is does not exist and at the same time if I attempt to create the account again it tells me the account already exists.  Same thing for adding a user to a group, I can add the user to a group but if I go back and query that user for the groups they are a member of it does not show the newly added group and attempting to add them again throws an exception.  Looking at the user in config they are already a member of the group.  If I wait a few minutes after performing the user administration task then the UnityAPI returns the expected results.

Has anyone else noticed similar behavior?

Thanks

Anthony

1 ACCEPTED ANSWER

Chris_Tucker
Star Contributor
Star Contributor

Hi Anthony,

Users which are retrieved through the Core.GetUser method are stored in a cache which is refreshed every 15 minutes. If you perform a user administration task you may not see your changes immediately, since the cache has not yet been refreshed.

The UserAdministration.GetUsers method does not cache users, and should always return up to date user objects. However, it can only be used to retrieve users which the current user has rights to administer.

Let me know if you have any more questions!

Chris

View answer in original post

4 REPLIES 4

Chris_Tucker
Star Contributor
Star Contributor

Hi Anthony,

Users which are retrieved through the Core.GetUser method are stored in a cache which is refreshed every 15 minutes. If you perform a user administration task you may not see your changes immediately, since the cache has not yet been refreshed.

The UserAdministration.GetUsers method does not cache users, and should always return up to date user objects. However, it can only be used to retrieve users which the current user has rights to administer.

Let me know if you have any more questions!

Chris

Thanks Chris, that explains what we have been seeing. Is there a way to force it out of cache or a way to tell it not to cache? The only problem I have with using the UserAdministration.GetUsers method is that I would have to iterate through 25,000 users to find the one I need.

Unfortunately, there's currently no good way to force a user out of the cache. You could dispose the Application object and reconnect to OnBase, but that would clear all cached items (Document Types, Keyword Types, etc.), and may have a negative performance impact on your application.

You could use the UserAdministration.GetUsers(UserGroup) overload to limit the number of users returned if you know a user group that the user belongs to. Also, the UserList.Find(id) and Find(name) methods are O(1) operations, so you do not need to worry about the overhead of iterating through all of the users. However, there is some overhead in the app server communication and deserialization of the user objects when GetUsers is called.

If none of these solutions work for you, feel free to contact your first line of support and they can help create an SCR for your issue. We've been looking at places to improve performance in the API, especially when only one item is needed from a large list of items sent down from the app server, and would love to hear more about your use case.

Paul_Sartori
Champ in-the-making
Champ in-the-making

Does this 15 minute delay still hold true for OnBase 15?  I am experiencing the same symptoms as the OP but we've recently upgraded to 15.  Thank you.