Java API cas with expiration

I do not see a cas call that will allow me to update with an expiry other than an the method that also uses the TranscCoder which I am not interested in using.

2 Questions:

  1. Is there a cas method that will allow me to set the expiry time on update without the TransCoder like (Object key, long cas, Object value, int expiry)…

  2. If the answer to the above is no what happens to the original expiration time on the key/value after a cas update? Is the original expiry retained or extended from the point of last cas update?

Hello

This is not possible today, I have logged an enhancement request:
http://www.couchbase.com/issues/browse/JCBC-330

To answer the second part of your question, if you do a cas() in the current API it will reset the TTL to 0 (so it will be save permanently)

Regards
Tug
@tgrall

Thank you for the quick response.

This seems as though it would be a rather severe issue for those using CAS? How are people working around it? Are they doing cas followed by touch to reset the expiry/document ttl?