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

Add CloudFlare Cache tags support #6887

Merged
merged 2 commits into from
Apr 13, 2020
Merged

Add CloudFlare Cache tags support #6887

merged 2 commits into from
Apr 13, 2020

Conversation

ericholscher
Copy link
Member

This lets us purge the CDN more easily.
This requires a version in the files_changed signal.

This lets us purge the CDN more easily.
This requires a version in the files_changed signal.
@ericholscher ericholscher requested a review from a team April 9, 2020 22:09
Copy link
Contributor

@davidfischer davidfischer 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 and signaling purging seems like a great idea.

Here's the Cloudflare docs on cache-tags: https://support.cloudflare.com/hc/en-us/articles/200169246-Purging-cached-resources-from-Cloudflare

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

I think we will want to trigger the purge when a project or a version is deleted as well.

Comment on lines +129 to +130
# Include the project & project-version so we can do larger purges if needed
response['Cache-Tags'] = f'{final_project.slug}-{version_slug},{final_project.slug}'
Copy link
Member

Choose a reason for hiding this comment

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

With this, we can decide to purge "project & version" or the whole "project" (all versions)? That's why we are separating this by a comma?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's correct. In the docs I linked above, cache tags are comma separated.

@ericholscher ericholscher merged commit c8aeb68 into master Apr 13, 2020
@ericholscher ericholscher deleted the cf-purging branch April 13, 2020 14:29
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