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
involves storing the results from read-only commands in a local cache. If the
58
+
same command is executed again later, the results can be obtained from the cache,
59
+
without contacting the server. This improves command execution time on the client,
60
+
while also reducing network traffic and server load. See
61
+
[Connect using client-side caching]({{< relref "/develop/clients/jedis/connect#connect-using-client-side-caching" >}})
62
+
for more information and example code.
20
63
21
64
### Timeouts
22
65
23
-
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:
66
+
If a network or server error occurs while your code is opening a
67
+
connection or issuing a command, it can end up hanging indefinitely.
68
+
You can prevent this from happening by setting timeouts for socket
69
+
reads and writes and for opening connections.
70
+
71
+
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.
72
+
(The socket timeout is the maximum time allowed for reading or writing data while executing a
73
+
command. The connection timeout is the maximum time allowed for establishing a new connection.)
0 commit comments