Node.js couchbase plugin get remaining expiration time


#1

Hello,
We are using node.js sdk to communicate with couchbase and use it for session management. When i create a new session object a set an expiry time. How can i get the remaining expiration time? I read that metadata has this piece of information, but i cannot get the metadata.
Thanks in advance


#2

Hi, I am pretty sure @brett19 or @tgreenstein will be able to help you on that.


#3

Hey @dimitris_re,

We do not currently have any way to retrieve information regarding the remaining time until expiry from any of our SDKs. This is considered internal information. One possibly solution however is to encode the expiry data into the document and then apply the appropriate expiration time when storing it.

Cheers, Brett