python - Resetting / Updating TTL for a Couchbase counter -


(this pretty simple question - 1 can answered trying out - since docs not explicit it, figured i'd document here)

when set new ttl'd couchbase counter (using incr() in python, example) - , re-incr() counter another ttl value, key's ttl reset new value?

here's way of asking this:

if run following code:

cb.incr(key='mykey',amount=1,initial=1,ttl=10) //10 seconds ttl cb.incr(key='mykey',amount=1,initial=1,ttl=100) //will update ttl? 

will key expire after 10 or 100 seconds?

the python library docs: http://docs.couchbase.com/sdk-api/couchbase-python-client-1.2.3/api/couchbase.html

no, second incr operation not update ttl. if want change ttl use touch command.

note matches behaviour of original memcached protocol - see example how incr work expiry times?


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -