Module: Switchman::ActiveSupport::Cache::RedisCacheStore

Defined in:
lib/switchman/active_support/cache.rb

Instance Method Summary collapse

Instance Method Details

#clear(namespace: nil) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/switchman/active_support/cache.rb', line 20

def clear(namespace: nil, **)
  # RedisCacheStore tries to be smart and only clear the cache under your namespace, if you have one set
  # unfortunately, it uses the keys command, which is extraordinarily inefficient in a large redis instance
  # fortunately, we can assume we control the entire instance, because we set up the namespacing, so just
  # always unset it temporarily for clear calls
  namespace = nil
  super
end