Class: HealthMonitor::Providers::Cache
- Defined in:
- lib/health_monitor/providers/cache.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from HealthMonitor::Providers::Base
Instance Method Details
#check! ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/health_monitor/providers/cache.rb', line 10 def check! time = Time.now.to_s Rails.cache.write(key, time) fetched = Rails.cache.read(key) raise "different values (now: #{time}, fetched: #{fetched})" if fetched != time rescue Exception => e raise CacheException.new(e.) end |