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

Purge Post URL, Home, Blog and Terms page on update #112

Merged
merged 4 commits into from
Oct 20, 2016

Conversation

brandomeniconi
Copy link
Contributor

Allows WP to purge this URLS on post (also page and CPT) update:

  • Post URL
  • Homepage
  • Page for posts (if set)
  • Related tags URLs
  • Related categories/taxonomies URLs
  • HTTP & HTTPS (only if admin from HTTPS)

Doesn't purge on post autosave.

I've tested this on Google AppEngine.

@brandomeniconi
Copy link
Contributor Author

Yes, correct. I've this code live on a news website and it's working as
expected.

2016-10-19 17:40 GMT+02:00 John Wineman notifications@github.com:

@jwineman commented on this pull request.

In cloudflare.loader.php
#112 (review)
:

@@ -46,4 +46,5 @@
// Load Automatic Cache Purge
add_action('switch_theme', array($cloudflareHooks, 'purgeCache'));
add_action('customize_save_after', array($cloudflareHooks, 'purgeCache'));

  • add_action('save_post', array($cloudflareHooks, 'purgePage'));

assuming is_admin() returns true any time they're saving a post correct?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#112 (review),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAX_mmgRJxBbi_mHT97r8TRrmvL9okcCks5q1jnsgaJpZM4Kau_U
.

@jwineman jwineman merged commit 46c12f8 into cloudflare:master Oct 20, 2016
@jwineman
Copy link
Contributor

This is awesome, thank you!

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

2 participants