• Resolved robjarsen

    (@robjarsen)


    After the release of version 1.5.0 of WP-Super-Cache, the plugin will no longer delete cached pages when requested. Everything else, on the other hand works fine.

    WP-SC version: 1.5.1
    WP version: 4.8
    Server: Microsoft-IIS/10.0 (PHP 7.1.7 with MySQL 5.7.19)

Viewing 15 replies - 1 through 15 (of 21 total)
  • Same issue here after the update on 4.8 can’t delete cache. Very annoying making changes to pages and the cache isnt clearing to reflect the changes.

    I’m still getting this issue. I’m having to manually delete the files through FTP each time I update a page.

    Please enable the debug log and tell me if anything stands out as an error. Be careful what you copy and paste because the log will have sensitive information about your server.

    This version of the plugin added a lot more checks to make sure that files outside of the cache directory weren’t deleted but maybe there was a problem there.

    OP is on Windows. What are the rest of you on? @onehundred, @go3asy?

    I rolled back to 1.4.9 for now and to note I’m also on windows

    I have another site on Linux which is fine so that could be a factor

    Same problem, also seems the supercached files don’t refresh when something gets updated.

    WP-SC version: 1.5.1
    WP version: 4.8
    Server: Microsoft-IIS/8.5 (PHP 7.0.21)

    And I’ll ask for the same thing, enable debugging and take a look at the debug log after you’ve edited a post. There’ll be a warning in there that will help. Hopefully. I don’t have a Windows server to test so I have to rely on you.

    This is everything relevant I could find:

    11:53:25 39460 /wp-admin/post.php wp_cache_post_edit: Clearing cache for post 2251 on post edit.

    11:53:25 279180 /wp-admin/admin-ajax.php wp_cache_get_cookies_values: /^wp-postpass_|^comment_author_|^wordpress_logged_in_/ Cookie detected: wordpress_logged_in_8e871422a63365a4cadae29ec1b77a88

    11:53:25 39460 /wp-admin/post.php grabbing lock using flock()

    11:53:25 279180 /wp-admin/admin-ajax.php wp_cache_get_cookies_values: return: da50b5c5dadec1ee76f40330c5c016f8

    11:53:25 39460 /wp-admin/post.php supercache dir: D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/zoek-jij-deze-job/

    11:53:25 279180 /wp-admin/admin-ajax.php Caching disabled for logged in users on settings page.

    11:53:25 39460 /wp-admin/post.php wp_cache_post_id_gc post_id: 2251 https://*CENSORED**CENSORED*/zoek-jij-deze-job/ clearing cache in D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/zoek-jij-deze-job/.

    11:53:25 39460 /wp-admin/post.php prune_super_cache: exiting as directory is not in cache path: *D:\www\*CENSORED*\www\wp-content\cache\supercache\*CENSORED**CENSORED*\zoek-jij-deze-job* (was D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/zoek-jij-deze-job/ before realpath)

    11:53:25 39460 /wp-admin/post.php wp_cache_post_id_gc clearing cache in D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/page/.

    11:53:25 39460 /wp-admin/post.php prune_super_cache: exiting as file/directory does not exist : D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/page/

    11:53:25 39460 /wp-admin/post.php Post change: supercache enabled: deleting cache files in D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/

    11:53:25 39460 /wp-admin/post.php Post change: deleting page_on_front and page_for_posts pages.

    11:53:25 39460 /wp-admin/post.php Post change: page_on_front 2826

    11:53:25 39460 /wp-admin/post.php Post change: Deleting files in: D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/zoek-jij-deze-job/

    11:53:25 279180 /wp-admin/admin-ajax.php wp_cache_get_cookies_values: cached: da50b5c5dadec1ee76f40330c5c016f8

    11:53:25 39460 /wp-admin/post.php wp_cache_post_change: checking D:\www\*CENSORED*\www\wp-content/cache/meta/

    11:53:25 279180 /wp-admin/admin-ajax.php In WP Cache Phase 2

    11:53:25 39460 /wp-admin/post.php releasing lock using flock()

    11:53:25 279180 /wp-admin/admin-ajax.php Created mutex lock on filename: D:\www\*CENSORED*\www\wp-content/cache/wp_cache_mutex.lock

    11:53:25 279180 /wp-admin/admin-ajax.php Setting up WordPress actions

    11:53:25 279180 /wp-admin/admin-ajax.php Not caching wp-admin requests.

    11:53:25 39460 /wp-admin/post.php wp_cache_post_change: Already processed post 2251.

    11:53:25 39460 /wp-admin/post.php wp_cache_post_edit: draft post, not deleting any cache files. status: inherit

    11:53:26 39460 /wp-admin/post.php wp_cache_post_edit: Already processed post 2251.

    11:53:26 39460 /wp-admin/post.php wp_cache_post_edit: Already processed post 2251.

    11:53:26 39460 /wp-admin/post.php?post=2251&action=edit&message=1 Caching disabled for logged in users on settings page.

    11:53:26 39460 /wp-admin/post.php?post=2251&action=edit&message=1 wp_cache_get_cookies_values: cached: da50b5c5dadec1ee76f40330c5c016f8

    11:53:26 39460 /wp-admin/post.php?post=2251&action=edit&message=1 In WP Cache Phase 2

    11:53:26 39460 /wp-admin/post.php?post=2251&action=edit&message=1 Created mutex lock on filename: D:\www\*CENSORED*\www\wp-content/cache/wp_cache_mutex.lock

    11:53:26 39460 /wp-admin/post.php?post=2251&action=edit&message=1 Setting up WordPress actions

    11:53:26 39460 /wp-admin/post.php?post=2251&action=edit&message=1 Not caching wp-admin requests.

    11:53:29 39460 /wp-admin/admin-ajax.php wp_cache_post_edit: draft post, not deleting any cache files. status: inherit

    11:53:29 39460 /wp-admin/admin-ajax.php wp_cache_post_change: draft post, not deleting any cache files.

    Thank you @hjsurk! This is what I need:

    prune_super_cache: exiting as directory is not in cache path: *D:\www\*CENSORED*\www\wp-content\cache\supercache\*CENSORED**CENSORED*\zoek-jij-deze-job* (was D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/zoek-jij-deze-job/ before realpath)

    I wonder if it’s the capital D of the drive letter? Can you edit wp-cache-phase2.php and look for the text, “prune_super_cache: exiting as directory is not in cache path”.
    On the next line you’ll see the text that was sent to the debug log in a wp_cache_debug() call. Add $rp_cache_path after the “:” and then check the debug log again for that “exiting as directory is not in cache path” error. It should show the “cache path” where all cache files are stored.
    Can you tell me if there are any differences between that cache path and that part of the path in the directories for individual posts (the paths with post names in them)? It might be that one is lowercase.

    I added the piece of code but didn’t notice a difference between uppercase or lowercase. Both seem to use the uppercase letter D.

    12:23:22 91576 /wp-admin/post.php prune_super_cache: D:\www\*CENSORED*\www\wp-content\cache/ exiting as directory is not in cache path: *D:\www\*CENSORED*\www\wp-content\cache\supercache\*CENSORED**CENSORED*\zoek-jij-deze-job* (was D:\www\*CENSORED*\www\wp-content/cache/supercache/*CENSORED**CENSORED*/zoek-jij-deze-job/ before realpath)

    Ah, I see it. The trailing slash is a forward slash, “/”, not a backslash, “\”.

    Since trailingslashit() was done after realpath() is called that wasn’t converted.

    Thanks for letting me know. Will this be updated or do you have an easy fix for now?

    It’ll be updated. I’ll have some code for you to test tomorrow. Stay tuned!

    Thread Starter robjarsen

    (@robjarsen)

    Sounds good @donncha!

    I fixed the problem in #318.

    I’d appreciate testing by copying wp-cache-phase1.php and wp-cache-phase2.php from here into your wp-content/plugins/wp-super-cache/ directory. It clears up usage of realpath() and trailingslashit().

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Cannot delete cache manually (WP-SC >= 1.5.0)’ is closed to new replies.