• m22878

    (@m22878)


    I have this site I use for development and have been using it for months and never had an issue like this, but now all the sudden most of the time when I click purge cache it takes literally 40 seconds before it’s done. I’m using version 4.5.8, and I have a second site that I have the same version on that only takes 2 seconds for each purge. Does anyone know if CF will limited a domain’s usage or something if it uses purge too much? It has been used a lot on this site, since it’s a dev site, and I really don’t know what else it could be because I have uninstalled and reinstalled the plugin many many many times, but it still takes 40 seconds most times to clear the cache, while the same version only takes 2 seconds, like normal, on my other site.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter m22878

    (@m22878)

    The 40 second delay is caused by the preloader, it goes away if I turn that off, but I don’t understand how I went so long without noticing this delay since the preloader has been on the whole time, since it’s on by default and I never messed with it.

    Anyway, in the logs it shows the cache purged in the middle of the preloading. Is this normal? The cache purge will show at different points in the preloading i.e. after 2 pages are preloaded, after 3, after 4 etc. it seems to change every time I purge, but it always happens in the middle of the preloading pages. Should it do that? I’m talking about this line: [2022-03-25 05:23:55] [cache_controller::purge_all] Purged whole Cloudflare cache you can see there are pages preloaded before it and after it.

    [2022-03-25 05:23:25] [cloudflare::start_preloader_for_all_urls] Getting last published posts for post types: Array
    (
        [0] => post
        [1] => page
        [2] => e-landing-page
        [4] => portfolio_page
        [5] => product
    )
    
    [2022-03-25 05:23:25] [cache_controller::start_cache_preloader_for_specific_urls] Adding 19 URLs to preloader queue
    [2022-03-25 05:23:26] [preloader::task] Preloading URL https://www.domain.com/product/bundle-kit/
    [2022-03-25 05:23:31] [preloader::task] Preloading URL https://www.domain.com/my-account/
    [2022-03-25 05:23:34] [preloader::task] Preloading URL https://www.domain.com/checkout/
    [2022-03-25 05:23:38] [preloader::task] Preloading URL https://www.domain.com/cart/
    [2022-03-25 05:23:42] [preloader::task] Preloading URL https://www.domain.com/shop/
    [2022-03-25 05:23:45] [preloader::task] Preloading URL https://www.domain.com/checkout__trashed/purchase-history/
    [2022-03-25 05:23:49] [preloader::task] Preloading URL https://www.domain.com/checkout__trashed/transaction-failed/
    [2022-03-25 05:23:52] [preloader::task] Preloading URL https://www.domain.com/checkout__trashed/purchase-confirmation/
    [2022-03-25 05:23:55] [cache_controller::purge_all] Purged whole Cloudflare cache
    [2022-03-25 05:23:55] [preloader::task] Preloading URL https://www.domain.com/slide-anything-popup-preview/
    • This reply was modified 2 years, 12 months ago by m22878.
    Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    the preloader uses cURL to hit the links mentioned. So, check your server logs why preloading is taking so much time. Also if you have a site with good amount of traffic you don’t need the preloader.

    Also the way purge cache works is that if you have enabled the option for purge only HTML pages, and then if you purge cache and you have lots of pages, it will create multiple queues to purge the URLs.

    The purge_all operation just send one request to CF to purge everything for your domain.

    Thread Starter m22878

    (@m22878)

    What about what I said how it says the purge all completes in the middle of the preloading pages? Look at the code in my previous post. This: [2022-03-25 05:23:55] [cache_controller::purge_all] Purged whole Cloudflare cache is always in the middle of the preloading links. Should it be like that? Seems like it would happen before all of the preloading links not in the middle of them.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @m22878,
    Yes, I can confirm that bug which I have already resolved in the code and will be there in the upcoming release. In the meantime, you can manually download this zip file with the fix in it and replace the plugin code with the content of this zip file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Purging cache takes 40 seconds’ is closed to new replies.