How to clear roster cache?

Hi:

I have a problem to how to clear roster cache.Everyone who know please give the detail answer.

Any advice much appreciated.

Thanks.

XMPPServer.getInstance().getRosterManager().removeRosterFromCache( packet.getFrom() );

This can clear your roster cache for a user.

hi,

where to write the below code to clear the cache? i mean in which class?

" XMPPServer.getInstance().getRosterManager().removeRosterFromCache( packet.getFrom() ); "

i added the rosters to user directly in roster and roster_group table , so to get available that contact immediatly into roster list is that above code is sufficient ? or else any thing else i need to change ? is yes where i have to change plz help me if anybody knows…

Hi,

do you want to write a plugin to delete the roster cache?

It would be a much better idea to write a plugin similar to the export/import plugin which uses the Openfire API to modify the roster.

If you want to clear the cache only one time you may either visit https://example.com:9091/system-cache.jsp or restart Openfire.

LG

Hi LG,

I want to do exactly the same thing. I mean I want to write a plugin where it allows me to manipulate user’s roasters through a URL. For example :

/manipulate_roaster.jsp?add=user1@domain.com&from=user2@domain.com&status=approved

Can you please guide me step by step how to do that?

Thanks in advance