I used the code below in my app to set the ttl for a document in CBL. If I am right, I think this ttl value will not be propagated to the couchbase server right?
So how can I set the ttl for the documents that are replicated from CBL to couchbase server, to make sure my server clean up the expired documents automatically? I can't find any documentation from Couchbase that could explain this clearly to me.
Date ttl = new Date(System.currentTimeMillis() + 86400000/2);
Document document = database.createDocument();
document.putProperties(properties);
document.setExpirationDate(ttl);