README.md in redis-client-0.15.0 vs README.md in redis-client-0.16.0

- old
+ new

@@ -40,11 +40,11 @@ r.call("SET", "mykey", "hello world") # => "OK" r.call("GET", "mykey") # => "hello world" end ``` -If you are working in a single threaded environment, or wish to use your own connection pooling mechanism, +If you are working in a single-threaded environment, or wish to use your own connection pooling mechanism, you can obtain a raw client with `#new_client` ```ruby redis_config = RedisClient.config(host: "10.0.1.1", port: 6380, db: 15) redis = redis_config.new_client @@ -65,15 +65,15 @@ - `url`: A Redis connection URL, e.g. `redis://example.com:6379/5`, a `rediss://` scheme enable SSL, and the path is interpreted as a database number. Note that all other configurations take precedence, e.g. `RedisClient.config(url: "redis://localhost:3000", port: 6380)` will connect on port `6380`. - `host`: The server hostname or IP address. Defaults to `"localhost"`. - `port`: The server port. Defaults to `6379`. - `path`: The path to a UNIX socket, if set `url`, `host` and `port` are ignored. -- `ssl`: Wether to connect using SSL or not. +- `ssl`: Whether to connect using SSL or not. - `ssl_params`: A configuration Hash passed to [`OpenSSL::SSL::SSLContext#set_params`](https://www.rubydoc.info/stdlib/openssl/OpenSSL%2FSSL%2FSSLContext:set_params), notable options include: - `cert`: The path to the client certificate (e.g. `client.crt`). - `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`), + - `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. - `timeout`: The general timeout in seconds, default to `1.0`. @@ -81,11 +81,11 @@ - `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. - `circuit_breaker`: A Hash with circuit breaker configuration. Defaults to `nil`. See the [circuit breaker section](#circuit-breaker) for details. - `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 metadatas. +- `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/). @@ -342,11 +342,11 @@ end end ``` *Note*: pubsub connections are stateful, as such they won't ever reconnect automatically. -The caller is resonsible for reconnecting if the connection is lost and to resubscribe to +The caller is responsible for reconnecting if the connection is lost and to resubscribe to all channels. ## Production ### Instrumentation and Middlewares @@ -378,11 +378,11 @@ ```ruby redis_config = RedisClient.config(middlewares: [AnotherRedisInstrumentation]) redis_config.new_client ``` -If middlewares need a client specific configuration, `Config#custom` can be used +If middlewares need a client-specific configuration, `Config#custom` can be used ```ruby module MyGlobalRedisInstrumentation def connect(redis_config) MyMonitoringService.instrument("redis.connect", tags: redis_config.custom[:tags]) { super } @@ -452,12 +452,12 @@ ```ruby redis_config = RedisClient.config(reconnect_attempts: [0, 0.05, 0.1]) ``` This configuration is generally used when the Redis server is expected to failover or recover relatively quickly and -that it's not really possibe to continue without issuing the command. +that it's not really possible to continue without issuing the command. -When the Redis server is used as an ephemeral cache, circuit breakers are generally prefered. +When the Redis server is used as an ephemeral cache, circuit breakers are generally preferred. ### Circuit Breaker When Redis is used as a cache and a connection error happens, you may not want to retry as it might take longer than to recompute the value. Instead it's likely preferable to mark the server as unavailable and let it