Delete, purge, and compact all seem to propagate back to the server, and I am looking for a better way to manage local documents specifically. Changing databases is a good idea, and one that I have tried before, but even if I change the name of the database either 1) the documents stay the same or 2) the pull replicator doesn’t take the new user channels into account, because the documents that correspond to the channels of the old users are still present in the database.
I am looking for a way to:
- Log out
- Remove all local documents from device
- Log in
- Re-pull documents that that user has access to
Unless there is a better way to purge documents from the local device from which that user should not have access to.
**Update: restarting the app seems to remove the documents that the new user does not have access to, but how can I simulate this without restarting the app?