Photon: add option to flush the cache for the whole site
You really need a way to clear the Photon cache for a site from within JetPack.
I was looking for a Photon cache in Jetpack and I couldn't find it. The only information I could find on clearing Photon caching is this text from the Photon developer page - "No cache invalidations – currently the images are cached “forever”. If you want to “refresh” an image you will need to change the name of the image. Adding random query arguments, commonly known as cachebusters, will not work." That text appears on the Jetpack Photon page, as well.
Is there another layer of caching in Jetpack that I missed, or is the only layer of caching the Photon service itself?
The only layer is Photon itself, so that documentation applies to Jetpack.
So, is this issue applicable to Jetpack? Is there such a thing as "clear the Photon cache"?
The request is, basically, create a way to clear the Photon cache via Jetpack. It isn't an option anywhere currently nor a quick enhancement. Will require working with the WP.com Systems folks to add invalidation to Photon I'd be expect.
@kraftbj That makes sense, thanks for walking me through it.
We're currently reworking a lot of the backend of the Photon CDN to stabilize it and migrate some of the servers, so this may become much more feasible in the near future. Also, adding automated purging of images when an image is deleted locally via the wp admin.
Any updates?
@maivutan We'll post here as soon as we make progress on this.
Any updates on this? Considering adding to a large site. Thanks!
@rdreessen As stated above, we'll post here when there are updates. Thanks!
Also requested here: https://wordpress.org/support/topic/jetpack-and-ewww-image-optimizer-images-problem?replies=6&view=all#post-7335364
Asked our systems team about the technical limitations around this so that we can decide how to handle
Based on the technical limitations of our CDN, there isn't a way to do this on a site-wide basis at this time.
So, it has taken you over a year to figure this out?
Why you can do this manually but the site-wide?
So, it has taken you over a year to figure this out?
We left it open in hope the technical limitations would change, but we've opted to close the issue at this time until such a time the infrastructure would make this feasible. In short, it didn't take us a year to determine the limitation, but a year to decide to not leave it open pending something outside our team's scope to change.
Why you can do this manually but the site-wide?
Manually, we're able to clear out specific individual URLs. We're unable to do this en mass and it's pretty time consuming, unfortunately.
Ok, so not site-wide. How about a button for each individual image in the Media library?
Another vote for a user-facing tool to flush Photon's cache for specific images: https://wordpress.org/support/topic/option-to-clear-image-cache?replies=1&view=all
Also requested here: https://wordpress.org/support/topic/please-remove-all-cached-images?replies=1&view=all
As an additional note - the goal is to make photon work with plugins such as https://wordpress.org/plugins/enable-media-replace/
As of now, an old image is being served after it has been replaced in the media library.
one idea: adding a date-modified-time-stamp to the end of photon url would tell it that the image has changed and needs to be refetched...