1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides/CHANGELOG.md
Sam Bostock e79364610c
Fallback to $MEMCACHE_SERVERS if no servers given
By default, Dalli has two fallbacks if no server addresses are given:

- $MEMCACHE_SERVERS
- "127.0.0.1:11211"

However, MemCacheStore does its own check for addresses, and falls back
to "localhost:11211" if none are present.

This can lead to bugs in migrations from the deprecated :dalli_store
(provided by the Dalli) to :mem_cache_store:

```diff
-config.cache_store = :dalli_store     # could be implicitly relying on $MEMCACHE_SERVERS
+config.cache_store = :mem_cache_store # ignores $MEMCACHE_SERVERS
```

By removing our own fallback and simply passing `nil` to Dalli::Client,
we get its fallback logic for free. Tests are added so we can detect if
this ever changes.
2020-10-20 23:50:52 -04:00

370 B

  • Updated ActiveSupport::Cache::MemCacheStore docs to reflect support for $MEMCACHE_SERVERS.

    Sam Bostock

  • Use Bookstore as a unified use-case for all examples in Active Record Query Interface Guide.

    Ashley Engelund, Vipul A M

Please check 6-0-stable for previous changes.