Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate cache-control for av-embeds routes #11852

Merged
merged 16 commits into from
Aug 23, 2024

Conversation

amoore108
Copy link
Contributor

@amoore108 amoore108 commented Aug 16, 2024

Resolves JIRA https://jira.dev.bbc.co.uk/browse/WSTEAM1-1237

Overall changes

  • Replicates the cache-control header from Morph for Syndication and non-Syndication routes

Testing

  1. List the steps used to test this PR.

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

@amoore108 amoore108 self-assigned this Aug 16, 2024
@amoore108 amoore108 marked this pull request as ready for review August 19, 2024 09:41
Copy link
Contributor

@Isabella-Mitchell Isabella-Mitchell left a comment

Choose a reason for hiding this comment

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

Looks good. I tried to test locally but I didn't see the expected results. However I'm not sure whether this is the right place, or we would expect to see this locally.

(I compared cache control of the document in the network tab for a live Morph asset and a local asset whilst running this branch).

@amoore108
Copy link
Contributor Author

amoore108 commented Aug 23, 2024

Looks good. I tried to test locally but I didn't see the expected results. However I'm not sure whether this is the right place, or we would expect to see this locally.

(I compared cache control of the document in the network tab for a live Morph asset and a local asset whilst running this branch).

Yea Next.js overrides the cache-control header when running locally/development mode so that hot-reloading / code change works correctly.

Think it sets it to something like no-cache or similar. It should change if you build the app in production mode and use yarn start.

@amoore108 amoore108 merged commit 92166c2 into latest Aug 23, 2024
12 checks passed
@amoore108 amoore108 deleted the replicate-av-embeds-cache-control branch August 23, 2024 08:21
@Isabella-Mitchell
Copy link
Contributor

app in production mode and use yarn start.

Nice, yep that worked! Will note that one down for next time 🙌

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