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

Fix deleted assets staying in Cloudflare cache #3518

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

rakyi
Copy link
Contributor

@rakyi rakyi commented Apr 19, 2024

When we delete a post it no longer gets baked and is thus not present in the next CF Pages deployment. However, assets can stay in the CF Pages cache for up to a week and we want them to be inaccessible right away, e.g. for job postings.

I verified that this works both locally and on staging, including deployment to staging Pages.

Fixes #2896

@rakyi rakyi changed the title Trigger staging build Fix deleted assets staying in Cloudflare cache Apr 19, 2024
Copy link

github-actions bot commented May 4, 2024

This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected.

@github-actions github-actions bot added the stale label May 4, 2024
@github-actions github-actions bot closed this May 7, 2024
@rakyi rakyi reopened this Jun 11, 2024
@rakyi rakyi force-pushed the fix-deleted-assets-in-cache branch from 64d7381 to 8aba47a Compare June 11, 2024 15:24
@github-actions github-actions bot removed the stale label Jun 12, 2024
@owidbot
Copy link
Contributor

owidbot commented Jun 12, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-fix-deleted-assets-in-cache

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-06-14 10:26:05 UTC
Execution time: 1.18 seconds

When we delete a post it no longer gets baked and is thus not present in
the next CF Pages deployment. However, assets can stay in the CF Pages
cache for up to a week and we want them to be inaccessible right away,
e.g. for job postings.
@rakyi rakyi requested a review from marcelgerber June 14, 2024 10:51
@rakyi rakyi marked this pull request as ready for review June 14, 2024 10:51
Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

Nice, I feel like this is a good solution to the problem

@rakyi rakyi force-pushed the fix-deleted-assets-in-cache branch from eebe6f6 to 314ad03 Compare June 18, 2024 11:28
@rakyi rakyi merged commit 5e19bdb into master Jun 18, 2024
14 of 16 checks passed
@rakyi rakyi deleted the fix-deleted-assets-in-cache branch June 18, 2024 11:33
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.

When deleting content (WP/Gdocs/charts), set up a redirect to ensure immediate inaccessibility
3 participants