Skip to content

Loading…

docs for config alongside ENV["MEMCACHE_SERVERS"] #426

Merged
merged 1 commit into from

2 participants

@jjb

documentation addressing question in #285

better late than never :)

@jjb jjb added a commit to jjb/dalli that referenced this pull request
@jjb jjb Accommodate nil server setting via ActiveSupport
see also #426
15bd7c8
@jjb

n.b. this isn't actually true until #427 is merged

@mperham mperham merged commit ecf8c4b into petergoldstein:master

1 check failed

Details default The Travis CI build failed
@jjb jjb deleted the jjb:document-env-servers-config branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 14, 2014
  1. @jjb

    docs for config alongside ENV["MEMCACHE_SERVERS"]

    jjb committed
    documentation addressing question in #285
Showing with 6 additions and 0 deletions.
  1. +6 −0 README.md
View
6 README.md
@@ -94,6 +94,12 @@ config.cache_store = :dalli_store, 'cache-1.example.com', 'cache-2.example.com',
{ :namespace => NAME_OF_RAILS_APP, :expires_in => 1.day, :compress => true }
```
+If your servers are specified in `ENV["MEMCACHE_SERVERS"]` (e.g. on Heroku when using a third-party hosted addon), simply provide `nil` for the servers:
+
+```ruby
+config.cache_store = :dalli_store, nil, { :namespace => NAME_OF_RAILS_APP, :expires_in => 1.day, :compress => true }
+```
+
To use Dalli for Rails session storage that times out after 20 minutes, in `config/initializers/session_store.rb`:
For Rails >= 3.2.4:
Something went wrong with that request. Please try again.