Class: GovukHealthcheck::RailsCache

Inherits:
Object
  • Object
show all
Defined in:
lib/govuk_app_config/govuk_healthcheck/rails_cache.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



3
4
5
# File 'lib/govuk_app_config/govuk_healthcheck/rails_cache.rb', line 3

def name
  :rails_cache
end

#statusObject



7
8
9
10
11
12
13
14
# File 'lib/govuk_app_config/govuk_healthcheck/rails_cache.rb', line 7

def status
  ::Rails.cache.write("healthcheck-cache", true)
  raise unless ::Rails.cache.read("healthcheck-cache")

  GovukHealthcheck::OK
rescue StandardError
  GovukHealthcheck::CRITICAL
end