You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This command enables the tracking feature of the Redis server, that is used
78
-
for [server assisted client side caching]({{< relref "/develop/use/client-side-caching" >}}).
78
+
for [server assisted client side caching]({{< relref "/develop/connect/clients/client-side-caching#tracking" >}}).
79
79
80
80
When tracking is enabled Redis remembers the keys that the connection
81
81
requested, in order to send later invalidation messages when such keys are
@@ -85,7 +85,7 @@ when the RESP3 protocol is used) or redirected in a different connection
85
85
available where clients participating in this protocol receive every
86
86
notification just subscribing to given key prefixes, regardless of the
87
87
keys that they requested. Given the complexity of the argument please
88
-
refer to [the main client side caching documentation]({{< relref "/develop/use/client-side-caching" >}}) for the details. This manual page is only a reference for the options of this subcommand.
88
+
refer to [the main client side caching documentation]({{< relref "/develop/reference/client-side-caching" >}}) for the details. This manual page is only a reference for the options of this subcommand.
Copy file name to clipboardExpand all lines: content/commands/client-trackinginfo/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ syntax_fmt: CLIENT TRACKINGINFO
29
29
syntax_str: ''
30
30
title: CLIENT TRACKINGINFO
31
31
---
32
-
The command returns information about the current client connection's use of the [server assisted client side caching]({{< relref "/develop/use/client-side-caching" >}}) feature.
32
+
The command returns information about the current client connection's use of the [server assisted client side caching]({{< relref "/develop/connect/clients/client-side-caching" >}}) feature.
33
33
34
34
Here's the list of tracking information sections and their respective values:
Copy file name to clipboardExpand all lines: content/commands/info/index.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -515,3 +515,24 @@ It won't be included when `INFO` or `INFO ALL` are called, and it is returned on
515
515
**A note about the word slave used in this man page**: Starting with Redis 5, if not for backward compatibility, the Redis project no longer uses the word slave. Unfortunately in this command the word slave is part of the protocol, so we'll be able to remove such occurrences only when this API will be naturally deprecated.
516
516
517
517
**Modules generated sections**: Starting with Redis 6, modules can inject their information into the `INFO` command. These are excluded by default even when the `all` argument is provided (it will include a list of loaded modules but not their generated info fields). To get these you must use either the `modules` argument or `everything`.
| <spantitle="Supported">✅ Standard</span><br /><spantitle="Supported"><nobr>✅ Active-Active</nobr></span> | <spantitle="Supported">✅ Standard</span><br /><spantitle="Supported"><nobr>✅ Active-Active</nobr></span> | In Redis Enterprise, `INFO` returns a different set of fields than Redis Community Edition.<br />Not supported for [scripts]({{<relref "/develop/interact/programmability">}}). |
524
+
525
+
Note: key memory usage is different on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead.
526
+
527
+
Additionally, for JSON keys, Redis implements a “shared string” mechanism to save memory when the same JSON field names or field values of type string are used more than once (either inter-key or intra-key).
528
+
In such cases, instead of storing the field names or values many times, Redis stores them only once. This mechanism is not in place for active-active databases.
529
+
530
+
On non-active-active databases, `INFO` (Memory > used_memory) reports that the shared memory is counted, but only once for all keys. On active-active databases, there is no shared memory, so if strings are repeated, they are stored multiple times.
531
+
532
+
**Example**
533
+
534
+
Suppose you have ten JSON keys, and each key has 5KB of unique content and 5KB of shared content.
535
+
536
+
For non-active-active databases, `INFO` (used_memory) would report (10 keys * 5KB) + 5KB ~= 55KB. The last term, "+ 5KB", is the size of the shared content.
537
+
538
+
For active-active databases, `INFO` (used_memory) would report 10 keys * 20KB ~= 200KB. This number includes some amount of CRDB overhead per JSON key.
|<spantitle="Supported">✅ Standard</span><br /><spantitle="Supported"><nobr>✅ Active-Active</nobr></span> | <spantitle="Supported">✅ Standard</span><br /><spantitle="Supported"><nobr>✅ Active-Active</nobr></span> | Not supported for [scripts]({{<relref "/develop/interact/programmability">}}) in Redis versions earlier than 7. |
96
+
97
+
Note: key memory usage is different on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead.
Because adding a `try-with-resources` block for each command can be cumbersome, consider using `JedisPooled` as an easier way to pool connections. `JedisPooled`, added in Jedis version 4.0.0, provides capabilities similar to `JedisPool` but with a more straightforward API.
System.out.println(jedis.get("foo")); // prints "bar"
359
+
```
322
360
323
-
As mentioned in the previous section, use `JedisPool` or `JedisPooled` to create a connection pool.
324
-
`JedisPooled`, added in Jedis version 4.0.0, provides capabilities similar to `JedisPool` but with a more straightforward API.
325
361
A connection pool holds a specified number of connections, creates more connections when necessary, and terminates them when they are no longer needed.
326
362
327
363
Here is a simplified connection lifecycle in a pool:
The following sections explain how to handle situations that may occur
409
+
in your production environment.
410
+
370
411
### Timeouts
371
412
372
413
To set a timeout for a connection, use the `JedisPooled` or `JedisPool` constructor with the `timeout` parameter, or use `JedisClientConfig` with the `socketTimeout` and `connectionTimeout` parameters:
0 commit comments