OK. I have it up and running, and so far so good. Still a little tedious using the links one at a time, but WAY better than adding blog IDs to code somewhere. I think I’d prefer the reverse logic where all are disabled and only enable one at a time, but I see how the current implementation was probably the path of least resistance and hey I’m not complaining!
A few tips for anyone else trying this:
1) In case it isn’t clear, the code should go in a .php file inside the /wp-content/plugins/wp-super-cache/plugins folder
2) I had to comment out the immediate check for
if ( defined( 'WP_ALLOW_MULTISITE' ) )
Multisite installations that were upgraded from WPMU might not have this set in wp-config.php (like us), and the condition was preventing it from running at all.
3) You have to activate and enable caching initially for the column to show up on the Sites page.
4) At first I was seeing mixed results and it seemed like it wasn’t working reliably. Use the built in Debug features! Turned out I was getting the notorious “No closing html tag. Not caching.” error. In this case not because of ob_start() but because I was enabling page compression in my theme like this:
ini_set('zlib.output_compression', 'On');
ini_set('zlib.output_compression_level', '1');
Even with compression turned OFF in WPSC, and pages rendering correctly, it was still preventing WPSC from caching. So I commented those, turned on compression in WPSC and everything was great. Debugging log will report which sites are not getting cached because DONOTCACHEPAGE is set.
Now, it would be a nice bonus to also have a comment written at the end of pages by WPSC when DONOTCACHEPAGE is set ??
Anyway, thanks again Donncha! I have to tell you that I only revisited WPSC in the midst of a mini crisis and this has been an important part of a solution for some load-based instability that was crashing our server periodically.