Tried PHP mode and it still doesn’t create home page cache files. Also, the “test” button creates two home pages named 1.html and 2.html but neither of them have the cache tags in the bottom of the source code.
Also, here is a sample of the logs at the occurance:
22:38:36 / supercache dir: /usr/local/apache2/vhosts/wshg.net/htdocs/wp-content/cache/supercache/wshg.net/
22:38:36 / No Super Cache file found for current URL: /usr/local/apache2/vhosts/wshg.net/htdocs/wp-content/cache/supercache/wshg.net/index.html
22:38:37 / In WP Cache Phase 2
22:38:37 / Setting up WordPress actions
22:38:37 / Created output buffer
22:38:37 / Output buffer callback
22:38:37 / No closing html tag. Not caching.
22:38:37 / wp_cache_shutdown_callback: collecting meta data.
22:38:37 / Did not write meta file: wp-cache-e42df010bdb75c28dd799948793ea914.meta ** *1* **
Ok after much Googling and research I finally figured it out. I wasn’t using the output buffer correctly in my home page sliders. Here was my code:
// display a trimmed subtitle if it exists.
if (function_exists('the_subheading')) {
ob_start();
the_subheading('', '');
$output = ob_get_clean();
$short_subtitle = mb_substr($output,0,50);
if (strlen($short_subtitle) >0){
print '<span class="subheading">' . $short_subtitle;
if (strlen($short_subtitle) >49) { echo '...'; }
print '</span>';
}
ob_end_flush();
};
I needed to just remove the “ob_end_flush();” from the end, as the ob_get_clean was enough. This code trims the length of the subheadlines provided by “SUbheading” plugin found here: http://wordpress.org/extend/plugins/subheading
Hope this comes to good use by someone else using WordPress WP Super Cache and the ob_start() function.