• Resolved mitizaro

    (@mitizaro)


    Dear Plugin creators.

    We’ve read the wonderful thread full of bills due to Amazon CloudFront’s invalidation system and your choice to update on each file/change.

    Since we also received a funky Invoice we decided it’s time to get things in order.

    We’ve enabled the option to purge the CDN manually only.

    However my principal question is this:

    If we create 5 blog posts each containing 1 picture and some text.. and we want to deploy that to the CDN with the manual approach — will this count as 5 Requests or as One? And HOW do we do it properly?

    Thank you,
    Dimitar

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mitizaro

    Thank you for your inquiry and I am happy to assist you with this.

    It will count as zero since W3 Total Cache itself doesn’t send purge requests at all in this case.
    Cloudflare doesn’t charge for “request”, but for invalidation path.
    Please check this link about invalidations.

    The first 1,000 invalidation paths that you submit per month are free; you pay for each invalidation path over 1,000 in a month. An invalidation path can be for a single file (such as /images/logo.jpg) or for multiple files (such as /images/*). A path that includes the * wildcard counts as one path even if it causes CloudFront to invalidate thousands of files.
    So you do the following:
    1. Invalidate all your images per-case basis,
    i.e.

    https//my-host/wp-content/uploads/2019/01/my-jan-image1.jpg
    https//my-host/wp-content/uploads/2019/01/my-jan-image2.jpg
    https//my-host/wp-content/uploads/2019/02/my-feb-image1.jpg

    that will be charged as 3 paths and that’s what w3tc does.

    2. Invalidate everything.
    that’s what w3tc’s purge all button does. All objects will be removed from cache so your traffic will grow and performance temporarily decline. Also, of course, you have to do it once after multiple posts updated, otherwise, if you purge after each change you’ll get the worse situation in the end (3 invalidate-all requests for 3 posts).

    3. Invalidate grouped based on knowledge what you’ve modified. In the example below, you may invalidate one of:
    3.1 https//my-host/wp-content/uploads/2019/* – one path, will invalidate all 2019 images only
    3.2 https//my-host/wp-content/uploads/2019/01/*, https//my-host/wp-content/uploads/2019/02/* – 2 paths, but will invalidate only all 2019 Jan and Feb images.
    I hope this helps!

    Thread Starter mitizaro

    (@mitizaro)

    First of all thank you for your response!

    Alright so you’re saying that if i have the following scenario:

    1) I have 27 total blog posts.
    I decide to change the pictures of two of them.

    Now i will have to somehow update my CDN, a.k.a Invalidate the paths to the old pictures.

    If i Hit the “Save Settings & Purge all Caches” button, it will only count for 1 new Invalidation URL, and not my whole deploy of 24541 files and make 24541 Invalidation URL request again, right?

    Sincerely,
    Dimitar

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mitizaro ,
    There is a Purge button in Performance>CDN. When you click on it there you can emove objects from the CDN by specifying the relative path on individual lines below and clicking the “Purge” button when done.
    Thank you.

    Thread Starter mitizaro

    (@mitizaro)

    Yes that is great. Thank you for the explanation.

    If i may add what would happen if i have three files that need change.

    And i hit the “Purge all caches” button:

    View post on imgur.com

    Will this count as one request (for my whole folder a.k.a “/*” ) or maybe as seperate ones based on sub-folders?

    If i have gathered everything from here correctly,
    If i hit the “Purge all caches” manually this will always count as ONE request no matter how many files need to be updated and in which places, or am i mistaken?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @mitizaro

    Purge all caches will invalidate all paths.
    This is why there is a purge button in Performance>CDN so you can specify the path. As stated before Cloudflare doesn’t charge for “request”, but for invalidation path.
    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to purge manually without the automatic CDN purge?’ is closed to new replies.