File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 361361 "since" : " 5.0.0" ,
362362 "group" : " sorted_set"
363363 },
364+ "CLIENT CACHING" : {
365+ "summary" : " Instruct the server about tracking or not keys in the next request" ,
366+ "complexity" : " O(1)" ,
367+ "arguments" : [
368+ {
369+ "name" : " mode" ,
370+ "type" : " enum" ,
371+ "enum" : [
372+ " YES" ,
373+ " NO"
374+ ]
375+ }
376+ ],
377+ "since" : " 6.0.0" ,
378+ "group" : " server"
379+ },
364380 "CLIENT ID" : {
365381 "summary" : " Returns the client ID for the current connection" ,
366382 "complexity" : " O(1)" ,
Original file line number Diff line number Diff line change 1+ This command controls the tracking of the keys in the next command executed
2+ by the connection, when tracking is enabled in ` OPTIN ` or ` OPTOUT ` mode.
3+ Please check the
4+ [ client side caching documentation] ( /topics/client-side-caching ) for
5+ background informations.
6+
7+ When tracking is enabled Redis, using the ` CLIENT TRACKING ` command, it is
8+ possible to specify the ` OPTIN ` or ` OPTOUT ` options, so that keys
9+ in read only commands are not automatically remembered by the server to
10+ be invalidated later. When we are in ` OPTIN ` mode, we can enable the
11+ tracking of the keys in the next command by calling ` CLIENT CACHING yes `
12+ immediately before it. Similarly when we are in ` OPTOUT ` mode, and keys
13+ are normally tracked, we can avoid the keys in the next command to be
14+ tracked using ` CLIENT CACHING no ` .
15+
16+ Basically the command sets a state in the connection, that is valid only
17+ for the next command execution, that will modify the behavior of client
18+ tracking.
19+
20+ @return
21+
22+ @simple-string-reply : ` OK ` or an error if the argument is not yes or no.
You can’t perform that action at this time.
0 commit comments