When writing my plugin code, the following doesn't work in the cache_templates hook (queries still added for uncached templates):
PHP Code:
$globaltemplates[] = 'my_extra_template';
But the following does:
PHP Code:
$globaltemplates = array_merge( $globaltemplates, array( 'my_extra_template' ) );
OR
PHP Code:
global $globaltemplates;
$globaltemplates[] = 'my_extra_template';
Also if I don't add the following to the parse_templates hook I get a spike in page generation time and server load:
PHP Code:
eval('$my_extra_template = "' . fetch_template('my_extra_template') . '";');