diff options
author | Seongchuel Ahn <aciddust20@gmail.com> | 2023-05-08 19:55:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 13:55:23 +0300 |
commit | 8c06d67f574bef941f7e19b1b2b36e767ed42b6d (patch) | |
tree | b96b704ff0593f3b7e2d06f5cd12af42d9213ca8 /redis/commands/core.py | |
parent | c0833f60a1d9ec85c589004aba6b6739e6298248 (diff) | |
download | redis-py-8c06d67f574bef941f7e19b1b2b36e767ed42b6d.tar.gz |
Add client no-touch (#2745)
* Add client no-touch
* Update redis/commands/core.py
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* Update test_commands.py
Improve test_client_no_touch
* Update test_commands.py
Add async version test case
* Chore remove whitespace
Oops
---------
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
Diffstat (limited to 'redis/commands/core.py')
-rw-r--r-- | redis/commands/core.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py index d67291b..1a4acb2 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -761,6 +761,17 @@ class ManagementCommands(CommandsProtocol): """ return self.execute_command("CLIENT NO-EVICT", mode) + def client_no_touch(self, mode: str) -> Union[Awaitable[str], str]: + """ + # The command controls whether commands sent by the client will alter + # the LRU/LFU of the keys they access. + # When turned on, the current client will not change LFU/LRU stats, + # unless it sends the TOUCH command. + + For more information see https://redis.io/commands/client-no-touch + """ + return self.execute_command("CLIENT NO-TOUCH", mode) + def command(self, **kwargs): """ Returns dict reply of details about all Redis commands. |