README.md in redis-client-0.22.1 vs README.md in redis-client-0.23.0
- old
+ new
@@ -1,11 +1,12 @@
# RedisClient
-`redis-client` is a simple, low-level, client for Redis 6+.
+`redis-client` is a simple, low-level, client for [Redis](https://redis.io/) 6+, [Valkey](https://valkey.io/) 7+, [KeyDB](https://docs.keydb.dev/),
+and several other databases that implement the same `RESP3` protocol.
Contrary to the `redis` gem, `redis-client` doesn't try to map all Redis commands to Ruby constructs,
-it merely is a thin wrapper on top of the RESP3 protocol.
+it merely is a thin wrapper on top of the `RESP3` protocol.
## Installation
Add this line to your application's Gemfile:
@@ -75,11 +76,11 @@
- `key`: The path to the client key (e.g. `client.key`).
- `ca_file`: The certificate authority to use, useful for self-signed certificates (e.g. `ca.crt`),
- `db`: The database to select after connecting, defaults to `0`.
- `id` ID for the client connection, assigns name to current connection by sending `CLIENT SETNAME`.
- `username` Username to authenticate against server, defaults to `"default"`.
-- `password` Password to authenticate against server.
+- `password` Password to authenticate against server. Can either be a String or a callable that recieve `username` as argument and return a passowrd as a String.
- `timeout`: The general timeout in seconds, default to `1.0`.
- `connect_timeout`: The connection timeout, takes precedence over the general timeout when connecting to the server.
- `read_timeout`: The read timeout, takes precedence over the general timeout when reading responses from the server.
- `write_timeout`: The write timeout, takes precedence over the general timeout when sending commands to the server.
- `reconnect_attempts`: Specify how many times the client should retry to send queries. Defaults to `0`. Makes sure to read the [reconnection section](#reconnection) before enabling it.
@@ -87,11 +88,11 @@
- `protocol:` The version of the RESP protocol to use. Default to `3`.
- `custom`: A user-owned value ignored by `redis-client` but available as `Config#custom`. This can be used to hold middleware configurations and other user-specific metadata.
### Sentinel support
-The client is able to perform automatic failover by using [Redis Sentinel](https://redis.io/docs/manual/sentinel/).
+The client is able to perform automatic failover by using [Redis Sentinel](https://redis.io/docs/latest/operate/oss_and_stack/management/sentinel/).
To connect using Sentinel, use:
```ruby
redis_config = RedisClient.sentinel(
@@ -147,11 +148,11 @@
{ host: '127.0.0.1', port: 26381 }]
redis_config = RedisClient.sentinel(name: 'mymaster', sentinels: SENTINELS, role: :master, password: 'mysecret')
```
-So you have to provide Sentinel credential and Redis explictly even they are the same
+So you have to provide Sentinel credential and Redis explicitly even they are the same
```ruby
# Use 'mysecret' to authenticate against the mymaster instance and sentinel
SENTINELS = [{ host: '127.0.0.1', port: 26380 },
{ host: '127.0.0.1', port: 26381 }]
@@ -522,10 +523,10 @@
longer than to recompute the value. Instead it's likely preferable to mark the server as unavailable and let it
recover for a while.
[Circuit breakers are a pattern that does exactly that](https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern).
-Configuation options:
+Configuration options:
- `error_threshold`. The amount of errors to encounter within `error_threshold_timeout` amount of time before opening the circuit, that is to start rejecting requests instantly.
- `error_threshold_timeout`. The amount of time in seconds that `error_threshold` errors must occur to open the circuit. Defaults to `error_timeout` seconds if not set.
- `error_timeout`. The amount of time in seconds until trying to query the resource again.
- `success_threshold`. The amount of successes on the circuit until closing it again, that is to start accepting all requests to the circuit.