Hello, I have a couple questions for the community:
We're using W3TC to push files to S3/CloudFront and are about to roll out multiple servers to operate in tandem. How can I tell W3TC which server is the "master" that should be the only one to try to run the CDN update cron job?
In all other respects, caching management operations should be shared across all servers, e.g. object cache invalidation.
Is there a constant that can be set in wp-config.php to make this possible?
Separately, we are running BuddyPress and have circumvented the problems on the avatar upload page by adding the DONOTCDN constant into the change-avatar template. However, we're still seeing a delay in sending the image to S3. What's the simplest way to upload these images on demand, for example when saved or generated during the media upload? I don't have a problem writing my own plugin hooks to do this but I need some assistance finding the right methods and arguments to use. Is there development documentation?
Based on this discussion it looks like this is the heart of the functionality:
$w3_plugin_cdn =& w3_instance('W3_Plugin_CdnCommon'); $w3_plugin_cdn->upload($files, false, $results);
Is this the right path or is there a better way?