SyncManager is caching the messages even if I logout and login

I have implemented the SyncManager for offline support of the chat. Now when I send messages in the offline and then when I logout of the app. Then in online mode if I login back to app I see that the messages sent in offline(which were failed) retries and sends. When I logout of the app I close the SendBird connection, clear cache; but also messages are being cached.

I want the messages(failed messages only) to get cleared when the user logout of the app. How can this be achieved. Please help.

Hi @Tej, Could you tell me Sendbird SDK and SyncManager SDK version which you used, please?

Hi @Tej ,

The SyncManagerSDK does not provide a way for removing cache only for failed messages. The SDK keeps cached messages until SendBirdSyncManager.clearCache() is called, which removes all cached channels and messages.

It seems like your Options.MessageResendPolicy is AUTOMATIC, since you mentioned it being sent when you login in online mode, so you can change the policy to MANUAL if you don’t want it to be resent automatically.

Thank you.

Hi @sardorbek.numonov thanks for the reply, my SendBird SDK and SyncManager SDK versions are com.sendbird.sdk:sendbird-android-sdk:3.0.148
com.sendbird.sdk:sendbird-syncmanager:1.1.26

Hi @hoons , thanks for the reply, but when I call the SendBirdSyncManager.clearCache() also the old messages are not getting cleared. And I want the ResendPolicy as Automatic only because I want to make sure the message are retired but when I logout of my app all the data should be cleared.