by latent » December 11th, 2010, 8:16 pm
First off... I freaking LOVE this plugin. Expect a donation from my day job very soon!
I was experimenting with a work-around for the the dynamic content problem, and ran across something a bit hinky.
This is for an ecommerce project, so I need to cache content for all users regardless of login status.
In a nutshell, my solution is to use old-school Apache SSI via #include virtual / #exec cgi. This way the HTML include comment is what actually gets cached (as opposed to the actual content). These includes point to little php scripts that just boot strap WP and show user status, etc. They are not cached.
All works as expected (fast as snot), EXCEPT.... once the cached file exceeds roughly 8k in size, the include suddenly breaks. The cache file contains all the expected content, and the include comment disappears (like it should), but the included content is simply missing (even though everything after it is intact). I've tested this by manually padding the cached file until it breaks. Neither the Apache or PHP logs are giving me any clue as to what's happening.
That 8k limit doesn't seem like a coincidence, but the only parameter I can find that's even a multiple of that threshold is output_buffering in php.ini. Changing this parameter has no effect.
This really seems like a viable work-around for the dynamic content problem... so long as I can figure out what's going on. Relevant version numbers shown below... any insight would be greatly appreciated.
PHP 5.3.3-1ubuntu9.1
Apache/2.2.16 (Ubuntu)
QC 2.2.7
WP 3.0.3