* admin/global.php: Start caching templates
* admin/index.php: Add the templates to cache
* includes/framework/: Of course this is a new framework thing :-)
// setup admin templates
require_once ISSO . '/Template.php';
-// BSTemplate::$dbCacheTable = TABLE_PREFIX . 'admintemplate';
+BSTemplate::$dbCacheTable = TABLE_PREFIX . 'template';
BSTemplate::$templatePath = 'admin/templates/%s.html';
+
+$globaltemplates = array(
+ 'doctype',
+ 'nav',
+ 'headinclude',
+ 'footer',
+);
+
+$start = microtime();
+BSTemplate::cache(array_merge($globaltemplates, (array)$fetchtemplates));
+BSApp::debug('time for tpl cache: ' . BSFunctions::fetch_microtime_diff($start));
+
BSTemplate::$globalVars = array(
'templates' => array(
'doctype' => BSTemplate::fetch('doctype')->evaluate()->getTemplate(),
|| ###################################################################
\*=====================================================================*/
+$fetchtemplates = array('main');
+
require_once('./global.php');
$template = new BSTemplate('main');
-Subproject commit 5a3fb4c7718dc321eee73921a0f4601618ed6694
+Subproject commit c289b359fa57962d635386910b814b4835fa6578