• I’ve noticed that the disk enhanced cache files are being regenerated fairly regularly. I’ve narrowed it down to the cron (I disabled the cron over night and there were no regenerations).

    Trouble is, I’m having difficulty pinpointing which of the cron jobs is causing the issue. Before I spend more time on this (perhaps disabling all of them and re-enabling one by one) are there any likely candidates from this list?

    action_scheduler_run_queue
    dce_check_license_cron
    delete_expired_transients
    elementor/tracker/send_event
    puc_cron_check_updates-dynamic-content-for-elementor
    rank_math/links/internal_links
    rank_math/redirection/clean_trashed
    recovery_mode_clean_expired_keys
    tribe_common_log_cleanup
    tribe_daily_cron
    tribe_schedule_transient_purge
    w3_minify_cleanup
    w3_pgcache_cleanup
    w3_pgcache_prime
    wf_scan_monitor
    wordfence_batchReportFailedAttempts
    wordfence_daily_cron
    wordfence_email_activity_report
    wordfence_hourly_cron
    wordfence_ls_ntp_cron
    wordfence_start_scheduled_scan
    wp_https_detection
    wp_privacy_delete_old_export_files
    wp_scheduled_auto_draft_delete
    wp_scheduled_delete
    wp_site_health_scheduled_check
    wp_update_plugins
    wp_update_themes
    wp_update_user_counts
    wp_version_check

    Thanks in advance!

    Jamie

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter Jamie Burchell

    (@jamieburchell)

    Seems like the cron tasks might be a red herring. I have executed each task one after the other, and none of them caused the cache to clear :/

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamieburchell

    Thank you for reaching out and I am happy to assist you with this.

    Looking at the lit of the cron jobs, I can see that you are using RankMath plugin.

    It’s been known that this plugin is calling the Page Cache purge when a post is updated or added to the site.
    It’s best to confirm what is calling the W3TC cache flush, by checking the Page Cache purge log (please note that this is a Pro feature), however, I would advise you to check the Rank Math article on How to Prevent Rank Math from Flushing W3 Total Cache.

    Let me know if this helps!

    Thanks!

    Thread Starter Jamie Burchell

    (@jamieburchell)

    Thanks @vmarko. I already have that RankMath fix in place, so I’ll keep on looking πŸ™‚

    Thread Starter Jamie Burchell

    (@jamieburchell)

    Well, it seems that the “index_slash_ssl.html” file is being renamed, then deleted and a new one created without a purge taking place at all. How is that possible? I stepped through the plugin code and added some debugging myself and the purge was never called.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamieburchell

    Thank you for your feedback.

    Are you using cache control header and expires header for the HTML&XML?

    Thanks!

    Thread Starter Jamie Burchell

    (@jamieburchell)

    @vmarko I think I’ve found it and it has nothing to do with the purging routines. It’s the routine which cleans up cache files which is taking its expires value of 3600 from browsercache.html.lifetime. Thing is, I don’t have that enabled in the config – the only thing I have enabled in the browser cache settings is last modified header.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamieburchell

    Thank you for your feedback

    Can you please try to increase Garbage collection interval: in Performance>Page Cache>advanced section to 86400s and see how often you are seeing this?

    Thanks!

    Thread Starter Jamie Burchell

    (@jamieburchell)

    Hi @vmarko increasing the value indeed affects how often the cache is cleared. Question is, should it if that part of the browser cache settings is disabled and if so, is it obvious enough that by default the page cache will be cleared after 3600 seconds? I suggest it isn’t obvious since I spent quite a lot of time hunting down why the pages were being deleted.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamieburchell

    Thank you for your feedback.

    We’ll make sure to clarify this more.

    Thanks again!

    Thread Starter Jamie Burchell

    (@jamieburchell)

    Thinking about this more @vmarko I wouldn’t expect the cache files to be deleted and governed by that page cache expiry time when that configuration is not enabled. That’s to say, if I have chosen not to add an expiry time to HTML files, then the files should not be deleted automatically.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamieburchell

    This only deletes the expired cached files named _old.

    DO you have any other form of cache control header or expires header?

    Thanks!

    Thread Starter Jamie Burchell

    (@jamieburchell)

    Hi @vmarko I’m referring to this code which appears to use the value of browsercache.html.lifetime to remove cached files.

    Since increasing that value, the cache files are not being deleted as often. However, why is it deleting them at all if I have not enabled “Set expires header” in the Browser Cache config? I don’t think the cache control header of HTML files should be coupled with the functionality to remove server side generated files. I don’t want HTML files to be cached in the browser, I want them to be fetched from the server cache. The server cache files should not be deleted periodically.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamieburchell

    Just to clarify. Have you increased the value of Garbage collection interval or the Expires header?

    Thanks!

    Thread Starter Jamie Burchell

    (@jamieburchell)

    @vmarko The value of the expires header. That’s what is controlling when the cache files are removed, even though I don’t have that option ticked in the settings.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Something is clearing the cache’ is closed to new replies.