README.md in redic-1.1.1 vs README.md in redic-1.2.0
- old
+ new
@@ -46,11 +46,18 @@
```ruby
# Timeout expressed in microseconds.
redis = Redic.new(REDIS_URL, 2_000_000)
redis.timeout == 2_000_000 #=> true
```
+A client can be re-configured, forcing the next connection to
+be established with the new details:
+```ruby
+redis = Redic.new("redis://localhost:6379")
+redis.configure("redis://localhost:6380")
+```
+
Here's one final example using both a Redis URL and a timeout:
```ruby
# It's recommended to store the REDIS_URL as an environment
# variable. Use `fetch` to retrieve values that must be present,
@@ -58,9 +65,12 @@
REDIS_URL = ENV.fetch("REDIS_URL")
REDIS_TIMEOUT = ENV.fetch("REDIS_TIMEOUT")
redis = Redic.new(REDIS_URL, REDIS_TIMEOUT)
```
+
+Both the initializer and the `configure` method accept a `URL` and
+a `timeout`.
## Differences with redis-rb
Redic uses [hiredis][hiredis] for the connection and for parsing
the replies. There are no alternative connection drivers. Unlike