• I have W3TC setup to use Cloudfront as a CDN, which is working fine, except when I need to make a change to a file.

    When I upload a new version of the CSS, I can push this to Amazon S3 fine, CloudFront obviously doesn’t request this new file for a while.

    Amazon say it’s best practice not to replace files on CF, but to add versioned files, which I kinda expected W3TC to do.

    So my question is, how do people deal with this? What’s the best way?

    Adding a query string version number doesn’t really help, because a visitor is likely to request the new file before it actually exists on CF, so when it does exist on CF the old version will already be cached with that version number.

    I can invalidate the file on CF, which speeds up the process somewhat, but it still takes some time, and obviously this is a manual process.

    Any thoughts?

    Thanks

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Amazon say it’s best practice not to replace files on CF, but to add versioned files, which I kinda expected W3TC to do.

    That’s right. W3TC doesn’t do versioning. Auto-versioning of CSS within WordPress as a plugin is the best solution. This article may provide you some clues on it, though.

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    That’s incorrect, W3TC does versioning for files that it minifies.

    Thread Starter daysleeper26

    (@daysleeper26)

    Thanks for the response, that’s good news!

    Is this something that needs to be enabled? I can’t see a setting for it.

    How does it work? The files don’t seem to be being versioned at the moment, at least not by file name.

    Thanks

    Sorry about the confusion. I was indeed incorrect. This plugin adds versioning using query strings, AFAIK. What I meant by versioning was using something like filename.hash.ext .

    Pothi Kalimuthu wrote:

    W3TC doesn’t do versioning. Auto-versioning of CSS within WordPress as a plugin is the best solution.

    :eek

    Frederick Townes reply to Pothi Kalimuthu:

    That’s incorrect, W3TC does versioning for files that it minifies.

    :lol

    Pothi Kalimuthu reply to Frederick Townes:

    Sorry about the confusion.

    Pothi: you have installed W3 Total Cache 1.0?

    @frederick Townes

    This is a public forum, evidently people can make whatever claims they wish …

    🙂

    @sla NGjI’s

    By ‘Pothi’, if you meant me and if you have any questions to me, I guess you know how to contact me. Why hijack someone else’s thread? Even though, there is no such rule here, it is considered impolite.

    Unsubscribing from this thread. 🙁

    :eek

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    @daysleeper26, query string and file name variations are used when changes to file contents are detected.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Best way to deal with CloudFront caching?’ is closed to new replies.