Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter dikko2000

    (@dikko2000)

    Are you implying that I should upgrade to new version?
    If so, thanks for the advice.

    But I still would to know if this is a bug in 1.3.28 and if you were already aware of it and have fixed it in the new version. Or, you are simply suggesting me to give it a try?

    Thanks.

    Yes, the second suggestion ” ‘add page after‘ and a ‘add page inside‘ link ” is what I had wanted most!

    Can’t wait to see it included in the new release.

    Thread Starter dikko2000

    (@dikko2000)

    Following your suggestion, I found this API from your Holy Shmoly! blog.
    “wp_cache_clear_cache()”, which looks like to be what we want.
    I finally added the calling code in, my “function.php”, instead of Super Cache plugin file.

    // clear super cache when inserting, updating or deleting post/page
    add_action('save_post', 'my_clear_super_cache');
    add_action('delete_post', 'my_clear_super_cache');
    function my_clear_super_cache() {
    	if ( function_exists('wp_cache_clear_cache') ) {
    		wp_cache_clear_cache();
    	}
    }

    It worked good so far when I tested by adding new, editing and deleting exisiting pages. Do you think it’s a good way?

    Thanks.

    Thread Starter dikko2000

    (@dikko2000)

    Hi Donncha,

    From the log above, the end of last part of some lines seem to be the file/folder where the operation was on. Only line 8 is related to whole supercache folder, which is what I wanted to clear when page is updated. Then I digged into plugin files and found this in file “wp-cache-phase2.php” line 997:

    if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Post change: deleting cache files in " . $cache_path . 'supercache/' . $siteurl, 4 );
    prune_super_cache( $cache_path . 'supercache/' . $siteurl . 'index.html', true, true );
    prune_super_cache( $cache_path . 'supercache/' . $siteurl . 'index.html.php', true, true );
    prune_super_cache( $cache_path . 'supercache/' . $siteurl . 'index.html.gz', true, true );
    do_action( 'gc_cache', 'prune', 'homepage' );

    However, the 4 lines of code following debug message seem to be doing something with only the “index” file, instead of whole cached folder.

    What exactly does this option “Clear all cache files when a post or page is published” mean? What does it mean by “all”?

    Take an example. If my site has 10 pages. After I update page #1, will all 10 cache files be deleted, or only page #1’s cache file is cleared?

    I have tested this on three sites, all faling to clear all cache files.

    Thanks.

    Thread Starter dikko2000

    (@dikko2000)

    Hi Donncha,

    Thanks for the advice.
    I have downloaded dev version (after deactivating and deleteing 0.9.9.9 version from my server), but sadly it still didn’t work.

    See the debug log below.

    03:06:06 /wp-admin/post.php Cookie detected: wordpress_logged_in_fa1b0e1d76b14648af8ed6521e67c66c
    03:06:06 /wp-admin/post.php In WP Cache Phase 2
    03:06:06 /wp-admin/post.php Setting up WordPress actions
    03:06:06 /wp-admin/post.php Not caching wp-admin requests.
    03:06:07 /wp-admin/post.php supercache dir: /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/about/
    03:06:07 /wp-admin/post.php wp_cache_post_id_gc post_id: 800 http://[theme_hostname]/about/ clearing cache in /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/about/.
    03:06:07 /wp-admin/post.php wp_cache_post_id_gc clearing cache in /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/about/page/.
    03:06:07 /wp-admin/post.php Post change: deleting cache files in /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/
    03:06:07 /wp-admin/post.php wp_cache_post_id_gc post_id: 800 http://[theme_hostname]/about/ clearing cache in /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/about/.
    03:06:07 /wp-admin/post.php wp_cache_post_id_gc clearing cache in /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/about/page/.
    03:06:07 /wp-admin/post.php?post=800&action=edit&message=1 Cookie detected: wordpress_logged_in_fa1b0e1d76b14648af8ed6521e67c66c
    03:06:07 /wp-admin/post.php?post=800&action=edit&message=1 supercache dir: /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/wp-admin/post.php/
    03:06:07 /wp-admin/post.php?post=800&action=edit&message=1 No wp-cache file exists. Must generate a new one.
    03:06:07 /wp-admin/post.php?post=800&action=edit&message=1 Cookie detected: wordpress_logged_in_fa1b0e1d76b14648af8ed6521e67c66c
    03:06:07 /wp-admin/post.php?post=800&action=edit&message=1 In WP Cache Phase 2
    03:06:07 /wp-admin/post.php?post=800&action=edit&message=1 Setting up WordPress actions
    03:06:07 /wp-admin/post.php?post=800&action=edit&message=1 Not caching wp-admin requests.
    03:06:11 /wp-content/themes/waohc/editor-style.css?ver=3393a Cookie detected: wordpress_logged_in_fa1b0e1d76b14648af8ed6521e67c66c
    03:06:11 /wp-content/themes/waohc/editor-style.css?ver=3393a supercache dir: /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/wp-content/themes/[theme_name]/editor-style.css/
    03:06:11 /wp-content/themes/waohc/editor-style.css?ver=3393a No wp-cache file exists. Must generate a new one.
    03:06:12 /wp-content/themes/waohc/editor-style.css?ver=3393a Cookie detected: wordpress_logged_in_fa1b0e1d76b14648af8ed6521e67c66c
    03:06:12 /wp-content/themes/waohc/editor-style.css?ver=3393a In WP Cache Phase 2
    03:06:12 /wp-content/themes/waohc/editor-style.css?ver=3393a Setting up WordPress actions
    03:06:12 /wp-content/themes/waohc/editor-style.css?ver=3393a Supercache caching disabled. Only using wp-cache. Non empty GET request.
    03:06:12 /wp-content/themes/waohc/editor-style.css?ver=3393a Created output buffer
    03:06:13 /wp-content/themes/waohc/editor-style.css?ver=3393a Output buffer callback
    03:06:13 /wp-content/themes/waohc/editor-style.css?ver=3393a 404 file not found not cached
    03:06:13 /wp-content/themes/waohc/editor-style.css?ver=3393a wp_cache_shutdown_callback: collecting meta data.

    I noticed that in line #8 it did say “03:06:07 /wp-admin/post.php Post change: deleting cache files in /var/www/virtual/[host_root]/home/wwwroot/wp-content/cache/supercache/[theme_hostname]/”. The path is right. But why are those
    files still remain there?

    How should I toubleshoot further?
    Thanks.

    Thread Starter dikko2000

    (@dikko2000)

    I do have other plugins, among which I think “Role Scoper” might have something to do with this problem.

    I used it because the client wanted to have multiple admin users with different privileges over different sections of the site.
    Currently, I have created only one user which has editor’s privilege over Page, Post, Slide, besides the default Admin user.

    Everything was OK with default Admin. The problem occured only with the editor user:

    I will try deactivating some plugins as you suggested. Thanks!

    Thread Starter dikko2000

    (@dikko2000)

    Sorry, I forgot to say that it all happened in Admin panel.

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