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

Rework frontend cache purging request model and signals #1776

Open
chigby opened this issue Oct 19, 2023 · 0 comments
Open

Rework frontend cache purging request model and signals #1776

chigby opened this issue Oct 19, 2023 · 0 comments

Comments

@chigby
Copy link
Contributor

chigby commented Oct 19, 2023

Follow up from #1773 (comment), previously discussed in #1155

Our existing frontend cache purging code connects page events (such as publishing and deleting) to requests to Cloudflare to purge the cache for related pages. This code could be made more efficient by using purge batches: Wagtail's way of purging multiple pages in a single request (we are currently sending one request for each page we want purged).

We could also be using the page_unpublished signal instead of the post_delete signal. When a page is unpublished, it disappears from the public site (so related pages should have their caches purged), but it does not send a delete signal. On the other hand, when an editor selects "delete" from the admin UI, it will send an unpublish signal prior to being deleted. So using this signal as a way of knowing when to clear the cache is more correct based on how wagtail expects to be used.

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

No branches or pull requests

1 participant