Reputation: 347
Can we update TTL of collection in couchbase at Runtime. In Java springboot? The requirement is to update TTL of entire collection and not for document.
Upvotes: 2
Views: 329
Reputation: 8899
It is not possible to change the max TTL of an existing collection.
A possible workaround would be to create a new collection with the desired TTL, then copy the documents from the old collection to the new one. (Admittedly, this is not something you would do casually at runtime.)
Upvotes: 2