lib/cache_failover/store.rb in cache_failover-0.1.1 vs lib/cache_failover/store.rb in cache_failover-0.1.2
- old
+ new
@@ -183,9 +183,13 @@
Timeout.timeout((init_options[:timeout] || 1)) do
case store.class.name
when 'ActiveSupport::Cache::RedisCacheStore'
(redis_cnxn(init_options).call('ping') == 'PONG' rescue false)
when 'ActiveSupport::Cache::MemCacheStore'
+ dalli_cnxn(init_options).alive!
+ dalli_cnxn(init_options).delete('cache_test')
+ dalli_cnxn(init_options).add('cache_test', 'success')
+ dalli_cnxn(init_options).get('cache_test') == 'success'
when 'SolidCache::Store'
cache_db_cnxn(init_options).with_connection { ActiveRecord::Base.connection.select_value('SELECT 1=1') == 1 }
when 'ActiveSupport::Cache::MemoryStore'
when 'ActiveSupport::Cache::FileStore'
when 'ActiveSupport::Cache::NullStore'