Couchbase lite 2.0 Document Time To Live

java

#1

Greetings,

I’m migrating my CBL application from CBL 1.4.1 to CBL 2.0, and in the previous version I made extensive use of the TTL property, allowing me to delete a document from a local database past a certain point.

I have failed to find this feature in the new implementation, is it still there or is there a new feature that handles this use case?


#2

Documentation Expiration didn’t make it into 2.0 . This is being tracked for a future release.
I have linked this post to the ticket so you can chime in there as well .
In the meantime, you would have to track a “createdAt” property within each document and schedule a task that purges the expired documents . Not the most convenient


#3

Thanks for you answer.

Sad to hear is not supported yet, good to hear it is being worked on. Thanks!


#4

Is there any update on this feature, or potentially any way to workaround it? We have a lot of events we store in CBL that we don’t need to keep around, so the expiration is a pretty important feature.

Thank You


#5

See Priya’s above comment for a workaround. No schedule for this feature yet.