• Resolved songjiekun

    (@songjiekun)


    hi.
    thank you for this great plugin.
    i use your plugin at my wp multisites installation.
    and when i clear cache and save settings.all caches in my sites network be flushed.(i use wp super cache). so i dig into code a little bit. i find the solution.
    at autoptimizeCache.php file
    line 91
    wp_cache_clear_cache()
    and
    line 106 107

    prune_super_cache($cache_path.'supercache/',true);
    prune_super_cache($cache_path,true);

    you just flush all the cahce for “wp super cache”

    so here is my modification.
    for line 91

    if (is_multisite()) {
    
                       $blog_id = get_current_blog_id();
                       wp_cache_clear_cache($blog_id); // wp super cache
                   }
                   else{
    
                       wp_cache_clear_cache(); // wp super cache
    
                   }

    for line 106 107

    if (is_multisite()) {
    
                       $blog_id = get_current_blog_id();
                       prune_super_cache( get_supercache_dir( $blog_id ), true );
                       prune_super_cache( $cache_path . 'blogs/', true );
                   }
                   else{
    
                       prune_super_cache($cache_path.'supercache/',true);
                       prune_super_cache($cache_path,true);
    
                   }

    i tried on my site. it works fine.

    thank you.

    https://wordpress.org/plugins/autoptimize/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"delete entire Network cache" problem hasn't been solved properly.’ is closed to new replies.