user2425109
user2425109

Reputation: 347

Couchbase- How to Update TTL of a collection

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

Answers (1)

dnault
dnault

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

Related Questions