• Resolved wwdadmin

    (@wwdadmin)


    Hi,

    I’ve used this plugin on several sites now but something strange is happening on one with Woo.

    I run the preload and it all seems to work.
    Look in the page cache page and I can see nn Mb of Cache and nn pages cached.
    Check in /wp-content/cache/wpo-cache/ and I can see all the relevant pages/products etc files…

    So all good.
    Then for some bizarre reason the cache is purged and all the files have gone.
    Plus if visiting pages as a “logged” in user the pages are not created.
    If log out then visit pages, then they are then cached.
    Is it supposed to load pages into cache if you are logged in or not?
    I guess not.

    I do have cache pages to logged on user set. Is it something to do with this.
    Theme being used is a non child implementation of Avada.

    Thanks,
    Chris

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter wwdadmin

    (@wwdadmin)

    Hi Marc,

    Ok, so I’ve set preload schedule on to run every 4 hrs to see what happens and in the error log I get:

    [30-Jan-2020 19:35:23 UTC] [INFO] : 117 urls found.
    [30-Jan-2020 19:35:23 UTC] [INFO] : Creating tasks for preload site urls.
    [30-Jan-2020 19:35:23 UTC] [INFO] : Tasks for preload site urls created.
    [30-Jan-2020 19:35:23 UTC] [INFO] : The queue for tasks of type “load-url-task” is empty. Aborting!
    [30-Jan-2020 23:15:47 UTC] [INFO] : 117 urls found.
    [30-Jan-2020 23:15:47 UTC] [INFO] : Creating tasks for preload site urls.
    [30-Jan-2020 23:15:47 UTC] [INFO] : Tasks for preload site urls created.
    [30-Jan-2020 23:15:47 UTC] [INFO] : The queue for tasks of type “load-url-task” is empty. Aborting!
    [31-Jan-2020 02:57:37 UTC] [INFO] : 117 urls found.
    [31-Jan-2020 02:57:37 UTC] [INFO] : Creating tasks for preload site urls.
    [31-Jan-2020 02:57:37 UTC] [INFO] : Tasks for preload site urls created.
    [31-Jan-2020 02:57:37 UTC] [INFO] : The queue for tasks of type “load-url-task” is empty. Aborting!
    [31-Jan-2020 06:36:50 UTC] [INFO] : 117 urls found.
    [31-Jan-2020 06:36:50 UTC] [INFO] : Creating tasks for preload site urls.
    [31-Jan-2020 06:36:50 UTC] [INFO] : Tasks for preload site urls created.
    [31-Jan-2020 06:36:50 UTC] [INFO] : The queue for tasks of type “load-url-task” is empty. Aborting!
    [31-Jan-2020 10:49:26 UTC] [INFO] : 117 urls found.
    [31-Jan-2020 10:49:26 UTC] [INFO] : Creating tasks for preload site urls.
    [31-Jan-2020 10:49:26 UTC] [INFO] : Tasks for preload site urls created.
    [31-Jan-2020 10:49:26 UTC] [INFO] : The queue for tasks of type “load-url-task” is empty. Aborting!

    Any ideas? I thought I could temporarily w/a the problem by preloading it more often.
    So something wrong here surely?

    Thanks,
    Chris

    Hi Chris,

    How did you set the preload schedule on to run every 4 hrs?

    If the cache files exist and haven’t reached their lifespan (within a certain threshold), the file isn’t regenerated.

    In order to force the preloader to regenerate the files, you can use the filter wpo_always_regenerate_file_if_preload_is_scheduled.
    I.e. add_filter('wpo_always_regenerate_file_if_preload_is_scheduled', '__return_true');

    If you want to always regenerate when a preloader is started, use
    add_filter('wpo_preloader_should_regenerate_file', '__return_true');

    Marc.

    Thread Starter wwdadmin

    (@wwdadmin)

    Hi Marc,

    Maybe I misunderstood your UI then?

    Page Cache page:

    Cache Settings.
    Cache Lifespan = 4 hours

    Preload now page:

    Schedule Preloader settings
    Ticked activate scheduled cache preloading
    Select schedule type = same as cache lifespan

    To me that says cache TTL is 4 hours and once expired run the preload again. No?

    Thanks,
    Chris

    No you’re right, that’s correct.
    What happens if you purge the cache then start a manual preload? does it work as expected?

    I’m doing some testing locally to see if I can reproduce.

    Marc.

    Thread Starter wwdadmin

    (@wwdadmin)

    Hi Marc,

    Yes, if I purge the cache and do a manual preload it does indeed work.
    Then we get back to the problem whereby it gets purged.
    I’m thinking this is a bit sporadic (purging). So my thinking is perhaps leaning towards WP Crontab.
    When I looked there are so many scheduled tasks I was quite surprised. Then I found the plugin WooCommerce Admin running a task every hour with 2000 entries in the log/posts table. I’ve now removed these and deactivated the plugin.

    Thanks,
    Chris

    Thread Starter wwdadmin

    (@wwdadmin)

    Update
    ======
    Woocommerce Admin Plugin appears to be the culprit for flushed/purged cache.
    Preload run: 5.12pm on 02/02/20
    Cache still there. longest it has stayed there.
    Need to check preload schedule now.
    this is common with the other reported case.
    Doesn’t explain my other site which doesn’t have woo installed but at least looking at wp-cron seems to be the right area to look into.

    Chris

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Cache files being deleted’ is closed to new replies.