WP Super Cache on Multisite.
-
I have Wp SuperCache up and running on a multisite wp installation.
Everything works great but not for the homepages: the test on the main settings page gave me an error about different timestamps.
After investigating (and googling) a lot I inspected the code and found that in wp-cache-phase1.php (ln 190) the following test did not work:
if ( $wp_cache_request_uri == $wp_cache_home_path || ( $wp_cache_slash_check && substr( $wp_cache_request_uri, -1 ) == ‘/’ ) || ( $wp_cache_slash_check == 0 && substr( $wp_cache_request_uri, -1 ) != ‘/’ ) ) {
After investigating again I found that in wp-cache-config.php the variable $wp_cache_home_path is assigned form site_url() wp function. I don’t know why but in my case this function returns the frontpage of a sub-site and not the frontpage of the main site.
So I changed site_url() with network_site_url() and the caching works great… but only for the primary site!! :))
I mean that if I run the test on a subsite I have the same problem about the difference of timestamp in the test pages. And the frontpage of subsites is never served cached (also for the anonymous users).I wonder if this is a multisite config problem of mine, if SuperCache is not fully compatible with multisite install or what else?
Thanks for your help.
Davide.
- The topic ‘WP Super Cache on Multisite.’ is closed to new replies.