You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Access the Memcache server via an instance of Dalli::Client
Now do the same with the object provided by Rails.cache
# frozen_string_literal: truerequire"bundler/inline"gemfile(true)dosource"https://rubygems.org"git_source(:github){ |repo| "https://github.com/#{repo}.git"}# Activate the gem you are reporting the issue against.gem"activesupport","~> 6.0.4.6"gem"dalli","~> 2.7.6"endrequire"active_support"require"active_support/core_ext/object/blank"require"minitest/autorun"classMemCacheBugTest < Minitest::Testdeftest_dalli_client_reads_memcache_servers_env_varENV.stub:[],"memcached.example.com:11211"dodalli_client=Dalli::Client.newassert_includesdalli_client.instance_variable_get(:@servers),"memcached.example.com:11211"endenddeftest_rails_cache_does_not_read_memcache_servers_env_varENV.stub:[],"memcached.example.com:11211"dodalli_client=ActiveSupport::Cache::MemCacheStore.new.instance_variable_get(:@data)refute_includesdalli_client.instance_variable_get(:@servers),"memcached.example.com:11211"endendend
Expected behavior
Rails configuration shouldn't prevent Dalli::Client instances from reading the value of MEMCACHE_SERVERS env variable.
Actual behavior
Rails configuration prevents Dalli::Client instances from reading the value of MEMCACHE_SERVERS env variable.
System configuration
Rails version: 6.0.4.6
Ruby version: 2.7.5
The text was updated successfully, but these errors were encountered:
Steps to reproduce
config.cache_store
to:mem_cache_store
dalli
gemMEMCACHE_SERVERS
env variableDalli::Client
Rails.cache
Expected behavior
Rails configuration shouldn't prevent
Dalli::Client
instances from reading the value ofMEMCACHE_SERVERS
env variable.Actual behavior
Rails configuration prevents
Dalli::Client
instances from reading the value ofMEMCACHE_SERVERS
env variable.System configuration
Rails version: 6.0.4.6
Ruby version: 2.7.5
The text was updated successfully, but these errors were encountered: