Hello @willstockstech,
I’ll have to analyze.
However w3tc_cdn_purge_files should work with most of the w3’s CDNs or all.
It must be a way that works for any CDN configured in w3.
Hello @willstockstech
To be clear, a lot will change in version 2.
.Support for multisite.
.the names of the gravatars will be hashs representing the content. This way, when you change the content, it automatically changes the name. This will no longer need to invalidate url in CDNs, Cloudflare, etc.
So the support for w3 CDN is only up to version 2.
Hey @jomisica
Yes, it seems w3tc_cdn_purge_files might be a good catch all for any of their CDN integrations, not just S3/CloudFront. Some investigation might be necessary – I’m happy to spin up a staging version of my site for testing if that would help?
Ahhh, that’s great! Version 2 is sounding good! Hashes as the file name would definitely alleviate having to invalidate URLs (long run, also a money saver as AWS charges for > 1000 invalidations)
Hello @willstockstech
Does version 1.4.4 work well with W3TC?
hi @jomisica – I have just updated my Gravatar now, so I’m going to see how things are tomorrow in terms of “auto cache clearing” 🙂
Looks like it has worked! I updated my Gravatar last night, have just checked my site now and can see that my latest Gravatar is showing on my site (I haven’t logged in or manually cleared my cache at all!)
That’s great, thank you @jomisica 😀
Great @willstockstech , I’ll then release version 1.4.4 for others using W3TC.
Thank you!
I do not want to discourage you @willstockstech, but I only see the new image in the posts.
@willstockstech
Do you have the option to clear the front page when a post is created enabled?
Hey @jomisica – how weird, when I checked on my desktop earlier, it was all good! Then again, I cleared browser cache to check.
When I check on mobile _none_ of them have changed!
When I check on another laptop, only my homepage has changed (in post is still old).
I think, what I’m going to do, is take Cloudfront out of the equation and serve the Gravatars from my server. That way I’m not adding Cloudfront caching to the mix.
Yes, I have that option enabled in W3TC, however I wonder whether that only fires on new content being published? Maybe it’s not part of the “page cache clear” process?
Let me remove my CDN from the mix and get back to you?
Hello @willstockstech
Can you check at least if the images have been synced to the CDN?
-
This reply was modified 7 years, 3 months ago by
José Miguel.
I will check – in theory they should have as W3TC does it regularly via cron.
https://willstocks.co.uk/wp-content/uploads/optimum-gravatar-cache/avatar/7.jpg?d=timxem
vs
https://cdn.willstocks.com/wp-content/uploads/optimum-gravatar-cache/avatar/7.jpg?d=timxem
Server appears to have new, CDN has old 🙁
I think it’s best I remove the CDN for the time being?
@willstockstech
Do you use WP Cron or linux cron?
WP-Cron but via https://cron-job.org/ (at the moment, on a every 2 minute schedule
Linux cron wouldn’t work for me for some reason a the command just wouldn’t execute, or if it did it would only partially complete and then things would just queue