How to remove a document from mobile once it reached more than 30days


#1

Hi There,
Im using Couchbase Mobile iOS so far. i added one channel to my document. my mobile memory increasing day by day. so i decided to remove some documents whatever created more than 30days. For this i tried to removed channel from document and i replicated. but those are not deleting from my iPhone device.

I want to keep all documents in server but only remove from local device memory. How to achieve this.

Thanks in Advance.


#2

Hi @itssrinadh,
take a look at the documentation and more specifically the purge method http://developer.couchbase.com/documentation/mobile/current/develop/guides/couchbase-lite/native-api/document/index.html

Regards,
Vladimir


#3

Thank you @vladoatanasov i will check it.


#4

In 1.3 we are adding a document-expiration feature that will let you configure documents to be automatically purged at a certain time. Until then you’ll need to manually purge them.