jodosha/redis-store — pull request #166 by prashantrajan (2013-01-27 06:31:53+00:00)
Title: cache_store connection url and default options

The cache_store example with an extra options hash at the end does not seem to work as listed in the example at https://github.com/jodosha/redis-store/blob/master/redis-rails/README.md#cache-store:

```
# config/application.rb
config.cache_store = :redis_store, "redis://localhost:6380/10/cache", { expires_in: 90.minutes }
```

I've added a failing test that shows that when trying to specify a single server with options (e.g. `:expires_in`), it ends up creating a `Redis::DistributedStore` with an additional connection to a non-existent `redis://127.0.0.1:6379`

Relates to #139 & #140. The response there was to use `:servers` / `:redis_server` but that seems to only apply to the Rails session store, not the cache_store.

I've also added another test that shows that the default options to the store (e.g. expires_in) don't get passed down to the write calls when an explicit `:expires_in` option is not given to the write calls. Not sure if this is meant to be supported but the example in the Readme implies it does.