-
Sam Bostock authored
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.
Sam Bostock authoredBy 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.
Loading