class Healthchecker::Checks::Cache

Public Instance Methods

cache_key() click to toggle source
# File lib/healthchecker/checks/cache.rb, line 11
def cache_key
  options[:cache_key] || SecureRandom.hex
end
check!() click to toggle source
# File lib/healthchecker/checks/cache.rb, line 6
def check!
  return if Rails.cache.write(cache_key, 'ok', :expires_in => 1.second)
  raise 'Unable to write to rails cache.'
end