• ResolvedPlugin Contributor Will Stocks

    (@willstockstech)


    Per discussion, support for W3TC would be beneficial, as W3TC is one of the (if not the) biggest caching plugins on WP (over 1m installs).

    I’m adding the following to my install:

    case 'w3-total-cache':
    	foreach ($postsIDsToClear as $postIDToClear) {
    		w3tc_flush_post((int)$postIDToClear);
    		w3tc_cdn_purge_files(); //Pass rray consisting of uri paths (i.e /wp-content/uploads/optimum-gravatar-cache/avatar/2.jpg)
    	}
    break;

    and

    if (defined('W3TC')) {
    	$this->cachePagePlugins='w3-total-cache';
    	return;
    }

    Using the w3tc_cdn_purge_files(); function is to be confirmed, based on: https://www.ads-software.com/support/topic/api-documentation-6/#post-11170484 – you likely do not want to “purge” a file, it’s probably more appropriate to “invalidate” a URI?

Viewing 15 replies - 16 through 30 (of 33 total)
  • Plugin Contributor Will Stocks

    (@willstockstech)

    My cron queue definitely clears down every time cron-jobs calls it! It appears to be working fine (OGC definitely worked as well!)

    Plugin Author José Miguel

    (@jomisica)

    @willstockstech

    CDN is good if it works.

    I think what you should do is check first because some pictures were not synced.

    Plugin Contributor Will Stocks

    (@willstockstech)

    I will run some checks, to see if I can find out which images did and didn’t upload – I will check logs as well to see if there were errors! ??

    Plugin Contributor Will Stocks

    (@willstockstech)

    Very strange… it looks like (at the moment) only 7.jpg didn’t update on my CDN… I’m going through them all manually and checking and so far that looks like the only one!

    Plugin Author José Miguel

    (@jomisica)

    All right @willstockstech, I’m just waiting.

    Plugin Contributor Will Stocks

    (@willstockstech)

    I have just checked W3TC – there were no upload failures or anything like that.

    I’m going to clear all my page caches now, and I have removed the CDN from serving the Gravatars, so I can see if it works fine without that in the mix!

    I will update my Gravatar shortly ??

    Plugin Author José Miguel

    (@jomisica)

    Hello @willstockstech

    Does the “Service Worker” of your site interfere by caching old gravatar?

    Do you confirm that the images have not been synced to the CDN?

    If you want, I can help you test the “Service worker”, just change your gravatar again.

    Plugin Contributor Will Stocks

    (@willstockstech)

    In theory, the service worker _shouldn’t_ affect it, because it’s a “Network First” service worker (https://www.ads-software.com/plugins/super-progressive-web-apps/).

    I’m updating my Gravatar now – I’m logged out of my site and all my caches were last cleared about an hour ago, so let’s see what happens!

    Plugin Contributor Will Stocks

    (@willstockstech)

    OK – Gravatar updated now!

    Plugin Author José Miguel

    (@jomisica)

    OK thank you!

    Plugin Contributor Will Stocks

    (@willstockstech)

    @jomisica – I have just checked my site (from my phone) and I am seeing my new avatar everywhere now!

    It looks like the W3TC integration is working perfectly ?? ?? – It looks like it was my CDN that was either caching the images, or the upload just wasn’t working properly

    • This reply was modified 5 years, 9 months ago by Will Stocks.
    Plugin Author José Miguel

    (@jomisica)

    Hello @willstockstech

    Not everything. The image that appears in the about widget is the old one.

    • This reply was modified 5 years, 9 months ago by José Miguel.
    Plugin Author José Miguel

    (@jomisica)

    @willstockstech

    About Me widget is using a customized image, I did not realize it.

    So the problem is with the CDN.

    But the CDN is not part of w3tc?

    Plugin Contributor Will Stocks

    (@willstockstech)

    I changed the about me widget yesterday as it was behaving strangely on certain pages (classes that were applied were being removed), so I set it to a static image rather than a Gravatar (it was previously!)

    Yes, it looks like the problem is either with:
    – Cloudfront caching the images at their edge’s
    – W3TC CDN uploader (as I was uploading the /avatar/ folder via W3TC’s CDN feature to AWS S3)

    I’ve disabled the W3TC CDN feature and I’m just serving the images from my server now instead. They’re not big images and I have HTTP/2 so it’s not a major issue ??

    Plugin Author José Miguel

    (@jomisica)

    Hello @willstockstech

    Very well.
    When I have time I will try to create an environment identical to yours so that I can understand what is causing this problem.

    Until then the plugin is left without W3TC support.

    These synchronization issues will happen even with version 2.

    If the images are not synced to CDN nothing is done.

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘W3TC support’ is closed to new replies.