summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnis Jonischkeit <ajonischkeit@imagus.com.au>2017-06-21 14:22:58 +1000
committerAnis Jonischkeit <ajonischkeit@imagus.com.au>2017-06-21 14:22:58 +1000
commit8359b38d117f1c888c8bfd8571aac3dbda344e39 (patch)
tree512646525ecbf9a5da0ae45e808fc51d860c2125
parentd6c300b39ab4c81cd97b81fcd8d25a9cde9476e7 (diff)
downloadredis-py-8359b38d117f1c888c8bfd8571aac3dbda344e39.tar.gz
added touch to StrictRedis
-rwxr-xr-xredis/client.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index 98764ca..c00b5c5 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -1217,6 +1217,12 @@ class StrictRedis(object):
"""
return self.execute_command('SUBSTR', name, start, end)
+ def touch(self, *args):
+ """
+ Alters the last access time of a key(s) ``*args``. A key is ignored if it does not exist.
+ """
+ return self.execute_command('TOUCH', *args)
+
def ttl(self, name):
"Returns the number of seconds until the key ``name`` will expire"
return self.execute_command('TTL', name)