WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Best way to deal with CloudFront caching? (9 posts)

  1. daysleeper26
    Member
    Posted 1 year ago #

    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/

  2. Pothi
    Member
    Posted 1 year ago #

    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.

  3. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

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

  4. daysleeper26
    Member
    Posted 1 year ago #

    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

  5. Pothi
    Member
    Posted 1 year ago #

    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 .

  6. sLa NGjI's
    Member
    Posted 1 year ago #

    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 ...

    :)

  7. Pothi
    Member
    Posted 1 year ago #

    @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. :(

  8. sLa NGjI's
    Member
    Posted 1 year ago #

    :eek

  9. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic