Handling Local Document Purging

If you create a new database per user and use it through out the application there shouldn’t be a problem with regards to documents belonging to other users.

Re-creating the push/pull replicators on the new database and passing the credentials of the logged in user will create a new Sync Gateway session cookie for that user and only the documents part of the user channels will be replicated. Which version of Couchbase Lite are you using?

You can just call delete on the database object to delete all the content of the database.

James