Skip to content

Conversation

@ahtesham-quraish
Copy link
Contributor

@ahtesham-quraish ahtesham-quraish commented Jan 27, 2026

What are the relevant tickets?

https://github.com/mitodl/hq/issues/9934

Description (What does it do?)

Fastly caches Next.js server rendered pages for 30 minutes, instructed by headers in the Next.js config.

As a result, when articles are published, the previous version is still served until the TTL expires.

This is perhaps acceptable for readers, unless there is some error in the article that needs to be updated quickly. It is however disorienting for editors, who expect to see their changes made live on publish.

We need to purge the CDN entry for the article detail URLs.

Screenshots (if appropriate):

  • Desktop screenshots
  • Mobile width screenshots

How can this be tested?

We can not test it locally because of host issue that happens when we hit the Fastly api from dev env so we need to test it on RC. I have added the logs which we can see on RC and its implementation is completed

Additional Context

@ahtesham-quraish ahtesham-quraish force-pushed the ahtesham/purge-cdn branch 3 times, most recently from f866ebd to b7aa240 Compare January 27, 2026 12:40
main/settings.py Outdated

# Fastly CDN settings
FASTLY_AUTH_TOKEN = get_string("FASTLY_AUTH_TOKEN", "")
FASTLY_URL = get_string("FASTLY_URL", "")
Copy link
Member

Choose a reason for hiding this comment

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

What is the URL that is being fetched here? Is it just the Fastly distribution identifier?

Copy link
Member

Choose a reason for hiding this comment

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

If it's just the URL for Fastly itself then there should be a default value that points to the actual URL that we are targeting since it's not something that is likely to change.

@ahtesham-quraish ahtesham-quraish force-pushed the ahtesham/purge-cdn branch 3 times, most recently from f96f40f to a912ac9 Compare January 29, 2026 10:54
@ahtesham-quraish ahtesham-quraish added the Needs Review An open Pull Request that is ready for review label Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review An open Pull Request that is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants