我正在构建一个社交网络,并希望使用 Couchbase 作为后端,但如果我在某个时间后使用同步网关,我将在设备上拥有很多用户不需要使用的数据。
如何在没有同步功能的情况下获取/发布/放置信息到 Couchbase 服务器,或者如何在不从服务器删除信息的情况下清除本地数据库?
I didn't have a 100% working solution, but want to share some information that I've got from community and representatives of Couchbase London & California.
First of all you can use CouchCocoa for working directly with SyncGateway, but it doesn't work as you expects, some part of your needs you can resolve using CouchCocoa.
Another way to build your own API proxy, but when you're a mobile developer only, it isn't a great idea. But, it could be created on different languages.
And as the last one thing is using Purge function. There are links to documentation that Couchbase team have now: http://wiki.apache.org/couchdb/Purge_Documents and http://couchbase.github.io/couchbase-lite-ios/docs/html/interfaceCBLDocument.html#a06bf7fd41678953924a56f76a921fe5a
Also you can go to Google Group and see all issues and how to fix/resolve/find workaround. Also, from our discussion with Couchbase representatives there will be a thread about how to get rid of synced info and so on. Link to Google Group https://groups.google.com/forum/#!forum/mobile-couchbase.
if you have any question, ask me, I'll try to help in the information area that I've already discovered.