Couchbase TTL Value of document

Hi Team,

We had the below scenario where the expiration value of the couchbase doc was set to zero.

  1. The bucket TTL value was enabled and it was set to 120sec.
  2. We had a document with TTL 60s and then we login to CB UI,doc in UI > edited one of the fields > clicked Save. Then we can find the TTL value set to 120s.
    Is there any way to preserve the TTL value of doc while updating through UI. Moreover, the expiration value in the metadata section in UI is non-editable.

Thanks,
Debasis

Refer to the web console documentation. If it doesn’t indicate an option for preserving or updating the expiration, then it’s not possible. Couchbase Web Console | Couchbase Docs

Most SDKs has preserveExpiry​(boolean preserveExpiry) Specifies whether an existing document’s expiry should be preserved.
N1QL has Settings and Parameters | Couchbase Docs if you know key u can set parameter in preferences and issue update.

Not sure UI document mutations @eben

The API used by the web console does not currently support preserveExpiry when editing documents. We have requested that they add that option.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.