Skip to content

Send cache headers in /api/country-support#5532

Merged
zachmargolis merged 3 commits intomainfrom
margolis-cache-header-country-support
Oct 22, 2021
Merged

Send cache headers in /api/country-support#5532
zachmargolis merged 3 commits intomainfrom
margolis-cache-header-country-support

Conversation

@zachmargolis
Copy link
Contributor

Quick follow-up to add caching headers, so that if people repeatedly refresh GSA-TTS/identity-site#707, at least their browser will hopefully cache for a little bit

skip_before_action :disable_caching

def index
expires_in 15.minutes, public: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my thinking was that a deploy takes us ~15 minutes, so that's the fastest we could change the configs

and the headers are really just a suggestion anyways, not like we have a CDN in front of this endpoint

@@ -1,5 +1,11 @@
class CountrySupportController < ApplicationController
prepend_before_action :skip_session_load
prepend_before_action :skip_session_expiration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼 👍🏼

@zachmargolis zachmargolis merged commit 9493e2e into main Oct 22, 2021
@zachmargolis zachmargolis deleted the margolis-cache-header-country-support branch October 22, 2021 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants