New users not showing up until cache is cleared

Hi everyone. I am using OpenFire 4.1.5 and I am writing a web app using strophe.js to interact with it.

The problem is that when I create a new user and then he immediately logs in my web app, he won’t see any of his contacts and nobody sees him until I clear all caches in the openfire (tried to clear them one by one to see what cache was but didn’t work that way).

If I don’t clear the caches the users becomes available after some time.

I’ts worth noting that the new user is immediately visible in the openfire admin after created it, with his groups and everything.

Thank you.

How are you creating users? You can’t just insert them into the database, you need to add the user via Openfire HTTP API or via XMPP account registration.

Hi, thank for your reply, I’m creating them using the API, but I’m using an old one, will try with the newest

So I finally updated my code and now I create users, groups using the REST API plugin, I also add the users to a group using said API, (I still add ofgroupprop directly in DB because I didn’t find how to use the API for that) and i still have the same problem.

The users show up instantly in the Openfire admin panel, but in my web they show up only after I clear all caches in Openfire.

Nevermind, I tried to add the user to a group before he was created :sweat: