Sync Gateway and document deletion/purging

Hi all,

I saw a few pointers to this topic, but I couldn’t really conclude.

We have a turnover of documents (updates, deletes, inserts) on the server and we wish only to sync the latest one and sync a deletion, if a document is becoming irrelevant.

The problem is twofold, the local database on the phones grows as it keeps the revision of deleted documents.
And if a new client comes in is downloads the entire revision tree of deleted documents on the server. (I also tried _purge, didn’t help)

What’s the best way to keep the local database sleek and delete documents once and for all?

Thanks and sorry if this question is somewhat redundant.

@blanke, What version of CBL and SG are you using?

CB 1.2.0 Release Note:

@househippo
we are using “name”: “Couchbase Sync Gateway”, “version”: 1.2
and for the Couchbase Lite Framework 1.1.1, if I am not mistaken (bundle version in the plist of the framework).

(we are still investigating if it may be another cause)