20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/skadi/engine.rb', line 20
def self.validate_cache_store!
return unless Skadi.configuration.use_anonymity_sets
return if Rails.env.local?
if Rails.cache.is_a?(ActiveSupport::Cache::NullStore)
Rails.logger.warn("Skadi: anonymity sets are enabled but Rails.cache is a ActiveSupport::Cache::NullStore. The pepper won't be saved so anonymity sets have been disabled.")
Skadi.configuration.use_anonymity_sets = false
end
if Rails.cache.is_a?(ActiveSupport::Cache::MemoryStore)
Rails.logger.warn("Skadi: anonymity sets are enabled but Rails.cache is a ActiveSupport::Cache::MemoryStore. If Rails is running across multiple processes or servers, the pepper won't be shared across processes, breaking anonymity-set grouping. Use a shared store (SolidCache/Redis/Memcached).")
end
end
|