• Hello,

    I am having an issue with WP Super Cache where the cached files created in wp-content/cache/supercache/domain.com are only lasting a few minutes before I see they are removed from the folder.

    I have both the “Cache Timeout” and “Scheduler > Timer” set to 86400.

    I have been trying to figure out why this is happening with no luck.

    • This topic was modified 7 years, 4 months ago by Justin Dixon.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Justin Dixon

    (@justin-dixon)

    On this site I have “define(‘DISABLE_WP_CRON’, true);” set so I run it manually with a cron job every 15 minutes.

    I thought that may have been when the cached files were getting removed, but I temporarily disabled the cron for testing and it still happened.

    Ben

    (@benbornschein)

    Did you checked the lifetime of the Garbage Collector?

    Thread Starter Justin Dixon

    (@justin-dixon)

    Yes, this is what I was referring to in the first post.

    Here are the settings;

    Ben

    (@benbornschein)

    Can you try to disable all other plugins and check if your cached files still get deleted after a few minutes?

    Thread Starter Justin Dixon

    (@justin-dixon)

    I have tried that, but it still was happening.

    I believe my issue is the same as this one reported on Github; https://github.com/Automattic/wp-super-cache/issues/84

    As someone suggested I tried setting up direct cache on the homepage and blog page. This seems to have fixed the issue of other pages/posts disappearing too frequently, however as the same person also mentions this causes another bug; https://github.com/Automattic/wp-super-cache/issues/149

    It is surprising that such old bugs(almost 2 years) are still existing.

    Thread Starter Justin Dixon

    (@justin-dixon)

    So since I had to add the homepage and blog to “Directly Cached Files” to keep the rest of the cached pages from being prematurely deleted every few minutes, is there any way that those pages get renewed automatically?

    Should a page update or preload not refresh those pages? Is my only option to delete them via a cron job?

    Ben

    (@benbornschein)

    Note sure how WP Super Cache handles this in the background. When you update a page and visit the page with your browser in private mode, do you get the old cached page?

    Do you use a cron-service to run WordPress wp-cron.php every 5-15 minutes?

    Thread Starter Justin Dixon

    (@justin-dixon)

    Yes, you get the old cached page still after updating. Even with the setting “Clear all cache files when a post or page is published or updated.” turned on.

    Yes, I have a cron job that runs wp-cron.php every 10 minutes.

    Thread Starter Justin Dixon

    (@justin-dixon)

    Have there been any updates to this issue?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Cached files only last a few minutes’ is closed to new replies.