CondeNast / purgely

A WordPress plugin to manage Fastly caching behavior and purging.
24 stars 9 forks source link

Add "Force Purge All" setting. #30

Open simonwistow opened 8 years ago

simonwistow commented 8 years ago

Allow a setting which always does a purge-all for every post update.

Not recommended but potentially useful in the nuclear case.

Fixes #28

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 6b1e97ffff261157c7c8b34c4af22bb72833df23 on fastly:allow-force-purge-all into 0f48431f8dc47a69cb8e701a710b972807f27e48 on CondeNast:master.

lukebussey commented 8 years ago

Does this purge the entire cache at Fastly? If so, then it would be better if it utilized surrogate-key purging of a key that exists on all Wordpress URIs.

On our site at yesware.com, Wordpress is installed in a subdirectory /blog/ with our Marketing site installed in the root folder. I currently just have a master surrogate key of wp which I use to purge from the Fastly app site.

tollmanz commented 8 years ago

Does this purge the entire cache at Fastly?

@lukebussey Yes. I believe it would. This is an opt-in feature.

I personally am a little wary of making purge all easily accessible. I defer to @simonwistow on this though as he has a better sense of what Fastly customers need.

Reading between the lines a bit, I can see that you are essentially suggesting that we have a feature that tags all WP content with a surrogate key for a specific site, allowing you to only purge one site at a time. I can see this being important for something like subdirectory multisite set ups.

As such, if we went this route, we could change the purge all mechanism to be surrogate key based. I could get behind that idea. One difference in this strategy though is that the purge all purges more than just HTML pages; it would also purge all assets (e.g., JS, CSS, etc) managed via Fastly.

I'm curious about @simonwistow's thoughts on this. Would there be much of a major difference in these two strategies?