• Resolved hoakinn25

    (@hoakinn25)


    Hello.
    I noticed that cache pages are constantly being deleted.
    What actions did:

    1. Uploaded a new photo
    2. Added a photo on page.
    3. Saved and cleared the cache only for them.

    It is possible that pages are deleted without action. Today / Tomorrow I’ll look at the logs.

    My settings:

    • ON – Preload mode
    • 0 – Refresh preloaded cache files
    • OFF – Clear all cache files when a post published or updating
    • 0 – Cache Timeout
    • Accepted Filenames: Single Posts, Pages

    The next day in the logs I saw the following:

    Notes:
    id=162300 – attachment post with a photo from the “Media” section (it has URL – https://myurl.ru/englishart/skyeng-240h400-1wm-1e91/)

    The plugin caches the attachment page and starts deleting other files. Why? In the settings, only – Post, Page and homepage.

    07:51:55 31794 /wp-admin/async-upload.php wp_cache_post_edit: Clearing cache for post 162300 on clean_post_cache
    07:51:55 31794 /wp-admin/async-upload.php supercache dir: /mypath/public_html/wp-content/cache/supercache/myurl.ru/mysite/skyeng-240h400-1wm-1e91/
    07:51:55 31794 /wp-admin/async-upload.php wp_cache_post_id_gc post_id: 162300 https://myurl.ru/mysite/skyeng-240h400-1wm-1e91/ clearing cache in /mypath/public_html/wp-content/cache/supercache/myurl.ru/mysite/skyeng-240h400-1wm-1e91/.
    07:51:55 31794 /wp-admin/async-upload.php wpsc_get_realpath: directory does not exist - /mypath/public_html/wp-content/cache/supercache/myurl.ru/mysite/skyeng-240h400-1wm-1e91/
    07:51:55 31794 /wp-admin/async-upload.php prune_super_cache: exiting as file/directory does not exist : /mypath/public_html/wp-content/cache/supercache/myurl.ru/mysite/skyeng-240h400-1wm-1e91/
    07:51:55 31794 /wp-admin/async-upload.php wp_cache_post_id_gc clearing cache in /mypath/public_html/wp-content/cache/supercache/myurl.ru/page/.
    07:51:55 31794 /wp-admin/async-upload.php wpsc_get_realpath: directory does not exist - /mypath/public_html/wp-content/cache/supercache/myurl.ru/page/
    07:51:55 31794 /wp-admin/async-upload.php prune_super_cache: exiting as file/directory does not exist : /mypath/public_html/wp-content/cache/supercache/myurl.ru/page/
    07:51:55 31794 /wp-admin/async-upload.php Post change: supercache enabled: deleting cache files in /mypath/public_html/wp-content/cache/supercache/myurl.ru/
    07:51:55 31794 /wp-admin/async-upload.php wpsc_delete_files: deleting /mypath/public_html/wp-content/cache/supercache/myurl.ru/
    07:51:55 31794 /wp-admin/async-upload.php wpsc_delete_files: reading files: .
    07:51:55 31794 /wp-admin/async-upload.php wpsc_delete_files: reading files: ..
    07:51:55 31794 /wp-admin/async-upload.php wpsc_delete_files: reading files: perevod-slova-industrial-na-angliyskiy-10001a
    07:51:55 31794 /wp-admin/async-upload.php wpsc_delete_files: reading files: angliyskie-slova-na-temu-razdely-psikhologii
    
    and so on 20.000+ lines................
    • Main page id = 390 is page where i added a photo.
    07:53:54 33570 /wp-admin/admin-ajax.php wp_cache_post_edit: Clearing cache for post 390 on clean_post_cache
    07:53:54 33570 /wp-admin/admin-ajax.php supercache dir: /mypath/public_html/wp-content/cache/supercache/myurl.ru/
    07:53:54 33570 /wp-admin/admin-ajax.php wp_cache_post_id_gc post_id: 390  clearing cache in /mypath/public_html/wp-content/cache/supercache/myurl.ru/.
    07:53:54 33570 /wp-admin/admin-ajax.php prune_super_cache: wp_cache_rebuild_or_delete( /mypath/public_html/wp-content/cache/supercache/myurl.ru/perevod-slova-industrial-na-angliyskiy-10001a/index-https.html )
    07:53:54 33570 /wp-admin/admin-ajax.php rebuild_or_gc: rename file to /mypath/public_html/wp-content/cache/supercache/myurl.ru/perevod-slova-industrial-na-angliyskiy-10001a/index-https.html.needs-rebuild
    07:53:54 33570 /wp-admin/admin-ajax.php gc: could not delete /mypath/public_html/wp-content/cache/supercache/myurl.ru/perevod-slova-industrial-na-angliyskiy-10001a as it's not empty: index-https.html.needs-rebuild
    
    thousands of similar lines
    
    07:53:55 33570 /wp-admin/admin-ajax.php wp_cache_post_id_gc clearing cache in /mypath/public_html/wp-content/cache/supercache/myurl.ru/page/.
    07:53:55 33570 /wp-admin/admin-ajax.php wpsc_get_realpath: directory does not exist - /mypath/public_html/wp-content/cache/supercache/myurl.ru/page/
    07:53:55 33570 /wp-admin/admin-ajax.php prune_super_cache: exiting as file/directory does not exist : /mypath/public_html/wp-content/cache/supercache/myurl.ru/page/
    07:53:55 33570 /wp-admin/admin-ajax.php Post change: supercache enabled: deleting cache files in /mypath/public_html/wp-content/cache/supercache/myurl.ru/
    07:53:55 33570 /wp-admin/admin-ajax.php wpsc_delete_files: deleting /mypath/public_html/wp-content/cache/supercache/myurl.ru/
    07:53:55 33570 /wp-admin/admin-ajax.php wpsc_delete_files: reading files: .
    07:53:55 33570 /wp-admin/admin-ajax.php wpsc_delete_files: reading files: ..
    07:53:55 33570 /wp-admin/admin-ajax.php wpsc_delete_files: reading files: perevod-slova-industrial-na-angliyskiy-10001a
    07:53:55 33570 /wp-admin/admin-ajax.php wpsc_delete_files: reading files: angliyskie-slova-na-temu-razdely-psikhologii
    
    thousands of similar lines.....
    07:54:06 33570 /wp-admin/admin-ajax.php wp_cache_post_edit: Clearing cache for post 390 on clean_post_cache
    07:54:06 33570 /wp-admin/admin-ajax.php supercache dir: /mypath/public_html/wp-content/cache/supercache/mysite.ru/
    07:54:06 33570 /wp-admin/admin-ajax.php wp_cache_post_id_gc post_id: 390 https://myurl.ru/ clearing cache in /mypath/public_html/wp-content/cache/supercache/mysite.ru/.
    07:54:06 33570 /wp-admin/admin-ajax.php prune_super_cache: wp_cache_rebuild_or_delete( /mypath/public_html/wp-content/cache/supercache/mysite.ru/perevod-slova-industrial-na-angliyskiy-10001a/index-https.html.needs-rebuild )
    07:54:06 33570 /wp-admin/admin-ajax.php rebuild_or_gc: rebuild file found. deleted because it was too old: /mypath/public_html/wp-content/cache/supercache/mysite.ru/perevod-slova-industrial-na-angliyskiy-10001a/index-https.html.needs-rebuild
    
    thousands of similar lines.....

    Files marked “too old” are deleted there. But the cache lifetime is completely disabled.

    07:54:06 33570 /wp-admin/admin-ajax.php wp_cache_post_edit: Clearing cache for post 390 on clean_post_cache
    07:54:06 33570 /wp-admin/admin-ajax.php supercache dir: /mypath/public_html/wp-content/cache/supercache/myurl.ru/
    07:54:06 33570 /wp-admin/admin-ajax.php wp_cache_post_id_gc post_id: 390 https://myurl.ru/ clearing cache in /mypath/public_html/wp-content/cache/supercache/myurl.ru/.
    07:54:06 33570 /wp-admin/admin-ajax.php prune_super_cache: wp_cache_rebuild_or_delete( /mypath/public_html/wp-content/cache/supercache/myurl.ru/perevod-slova-industrial-na-angliyskiy-10001a/index-https.html.needs-rebuild )
    07:54:06 33570 /wp-admin/admin-ajax.php rebuild_or_gc: rebuild file found. deleted because it was too old: /mypath/public_html/wp-content/cache/supercache/myurl.ru/perevod-slova-industrial-na-angliyskiy-10001a/index-https.html.needs-rebuild
    
    thousands of similar lines.....

    Then the files are deleted.

    07:54:07 33570 /wp-admin/admin-ajax.php Post change: supercache enabled: deleting cache files in /mypath//public_html/wp-content/cache/supercache/englishart.ru/
    07:54:07 33570 /wp-admin/admin-ajax.php wpsc_delete_files: deleting /mypath//public_html/wp-content/cache/supercache/myurl.ru/
    07:54:07 33570 /wp-admin/admin-ajax.php wpsc_delete_files: reading files: .
    07:54:07 33570 /wp-admin/admin-ajax.php wpsc_delete_files: reading files: ..
    07:54:07 33570 /wp-admin/admin-ajax.php wpsc_delete_files: reading files: perevod-slova-industrial-na-angliyskiy-10001a
    
    thousands of similar lines.....

    Tell me if there are tools to understand what exactly initiates the deletion of the cache?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello!
    I have a similar problem.
    The super cache files are cleared once a day by themselves and I can’t find the cause. It doesn’t depend on publishing new posts, just at some point I see that the files are cleared.
    I have tried versions 1.93 and 1.94.
    My settings are the same as the author of this thread
    Any idea what settings I need to pay attention to?

    @hoakinn25 – the first log file segment you posted happens because when you upload an image through wp-admin/upload.php it creates an attachment page as you found out. This triggers the “new page” process in WordPress that tells the plugin to delete “related pages” which include the front page, /page/ archives, and author archives.

    As for post_id 390 – get_permalink( 390 ) is returning https://myurl.ru/ as the permalink of that post. Do you have that post set as the static front page of your site?

    Are you using the classic editor or the block editor?

    The new version of the plugin released yesterday may actually fix this, as it disables caching in wp-admin.

    @sombrero610 – it’s probably best to start a new thread, as your problem may be something different.

    Thread Starter hoakinn25

    (@hoakinn25)

    Hello @donncha. Thanks for the answer.

    I use the Elementor editor.

    I still can not reproduce the exact steps that precede the removal.
    Today, about 30,000 files have been deleted. No files have been added. Only the text of one post was edited.

    I noticed that all files from the cache folder are also deleted for all other plugins besides WP Super Cache. This happens for all files at once. It’s about plugins Autooptimize, jsoncontentimporter.

    I will look for the reason for this behavior.

    Thread Starter hoakinn25

    (@hoakinn25)

    Hello @donncha.

    I think I caught the moment – the cache is deleted immediately after logging.
    Before logging (via FTP) I checked the cache folder – there were thousands of files. I also included the PHP profiler.

    The logs just show that the cache is still being removed from the Autooptimize plugin folder

    17:01:56 34152 /wp-admin/ wp_cache_replace_line: setting not changed - $wp_cache_debug_log = '051b065877073e93ab9615515e7f7e48.php';
    17:01:56 34152 /wp-admin/ wp_cache_replace_line: setting not changed - $wp_cache_debug_username = '8bbcdb555cb5aaf7172eaddeb797b5a6';
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/supercache/index.html as it's protected.
    17:01:56 34152 /wp-admin/ prune_super_cache: did not delete file: /wp-content/cache/supercache/index.html
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/supercache/index.html as it's protected.
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/supercache as it's protected.
    17:01:56 34152 /wp-admin/ prune_super_cache: deleted /wp-content/cache/autoptimize/js/index.html
    17:01:56 34152 /wp-admin/ gc: deleted /wp-content/cache/autoptimize/js, forced delete
    17:01:56 34152 /wp-admin/ prune_super_cache: deleted /wp-content/cache/autoptimize/css/index.html
    17:01:56 34152 /wp-admin/ gc: deleted /wp-content/cache/autoptimize/css, forced delete
    17:01:56 34152 /wp-admin/ prune_super_cache: deleted /wp-content/cache/autoptimize/index.html
    17:01:56 34152 /wp-admin/ gc: deleted /wp-content/cache/autoptimize, forced delete
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/.htaccess as it's protected.
    17:01:56 34152 /wp-admin/ prune_super_cache: did not delete file: /wp-content/cache/.htaccess
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/.htaccess as it's protected.
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/meta/index.html as it's protected.
    17:01:56 34152 /wp-admin/ prune_super_cache: did not delete file: /wp-content/cache/meta/index.html
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/meta/index.html as it's protected.
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/meta as it's protected.
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/index.html as it's protected.
    17:01:56 34152 /wp-admin/ prune_super_cache: did not delete file: /wp-content/cache/index.html
    17:01:56 34152 /wp-admin/ gc: could not delete /wp-content/cache/index.html as it's protected.

    I am far from programming. Therefore, I will deal with the results of the profiler. But apparently the process starts the plugin Yoast. Create a ticket in their plugin.

    • This reply was modified 1 year, 6 months ago by hoakinn25.
    • This reply was modified 1 year, 6 months ago by hoakinn25.

    I’ve opened an issue in the Yoast SEO repository about this. I’m seeing the same thing, my cache is completely nuked once a day just by visiting the admin:

    https://github.com/Yoast/wordpress-seo/issues/20554

    After investigating I’m 100% sure the issue comes from Yoast SEO, most likely linked to their SEO data optimization feature.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Delete all cache without any actions (add / update post)’ is closed to new replies.