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

@ericholscher ericholscher commented Apr 9, 2020

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

ericholscher added 2 commits Apr 9, 2020
This lets us purge the CDN more easily.
This requires a version in the files_changed signal.
@ericholscher ericholscher requested a review from Apr 9, 2020
Copy link
Contributor

@davidfischer davidfischer left a comment

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

humitos
humitos approved these changes Apr 9, 2020
Copy link
Member

@humitos humitos left a comment

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

# 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

@humitos humitos Apr 9, 2020

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

@davidfischer davidfischer Apr 9, 2020

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
2 checks passed
@ericholscher ericholscher deleted the cf-purging branch Apr 13, 2020
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.

None yet

3 participants