Skip to content

Commit

Permalink
Merge pull request #1704 from etalab/enhance/status_page_request_cache
Browse files Browse the repository at this point in the history
increasing cache and limiting request time for status page
  • Loading branch information
Samuelfaure authored Oct 23, 2024
2 parents d9c6a22 + 72b07ce commit 167a88e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/status_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def raw_current_status
def retrieve_from_status_page
status = page_config_data['globals']['topLevelStatus']['status']

cache.write(cache_key, status, expires_in: 5.minutes.to_i)
cache.write(cache_key, status, expires_in: 60.minutes.to_i)

status
end
Expand All @@ -44,7 +44,7 @@ def page_config_data
end

def page_config_data_body
URI.parse(page_config_data_url).open.read
URI.parse(page_config_data_url).open(open_timeout: 10, read_timeout: 10).read
end

def page_config_data_url
Expand Down

0 comments on commit 167a88e

Please sign in to comment.