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

Clear GraphCDN cache on Wordpress updates/page passwords #234

Open
chrisherold opened this issue Sep 27, 2022 · 0 comments
Open

Clear GraphCDN cache on Wordpress updates/page passwords #234

chrisherold opened this issue Sep 27, 2022 · 0 comments

Comments

@chrisherold
Copy link
Collaborator

Currently in the webhooks.php helper there's a wordpress filter to clear the GraphCDN cache on publish. However, we've run into some issues where the post is updated (e.g. from publish to trash or private) and the cached version of the published paged is still served. Updating the filter from 'publish_' . $post_type to transition_post_status should better clear the cache.

Additionally, when a page password is set/removed on a page the page status in Wordpress does not change, but we still want to clear the cache so that the password dialog is correctly set or removed on the public facing page. We can use the pre_post_update Wordpress filter to get the current page password and compare it to the incoming password from $data and clear the cache if those values do not match

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