diff options
author | laixintao <laixintaoo@gmail.com> | 2020-03-10 11:18:33 +0800 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2020-03-24 14:56:15 -0700 |
commit | d1279291d68c77709d69fe13aa7ff6d912d98ce4 (patch) | |
tree | 8a577af44668d63f31dbdeae3a7282fb735bba4e /CHANGES | |
parent | f2f470e192f3ddff66d79293c85e06e7e910316f (diff) | |
download | redis-py-d1279291d68c77709d69fe13aa7ff6d912d98ce4.tar.gz |
Lock.extend() can now replace the lock's existing TTL with a new value
Lock.extend() now has a new option, `replace_ttl`. When False (the
default), Lock.extend() adds the `additional_time` to the lock's existing
TTL. When replace_ttl=True, the lock's existing TTL is replaced with
the value of `additional_time`.
Diffstat (limited to 'CHANGES')
-rw-r--r-- | CHANGES | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -22,6 +22,10 @@ a roundtrip to the server by not having to call UNWATCH within Pipeline.reset(). Thanks @nickgaya, #1299/#1302 * Add the KEEPTTL option for the SET command. Thanks @laixintao #1304/#1280 + * Lock.extend() now has a new option, `replace_ttl`. When False (the + default), Lock.extend() adds the `additional_time` to the lock's existing + TTL. When replace_ttl=True, the lock's existing TTL is replaced with + the value of `additional_time`. * 3.4.1 * Move the username argument in the Redis and Connection classes to the end of the argument list. This helps those poor souls that specify all |