I have a template which is of .php extension. This template contains the html maarkup along with some php variables. This is how it looks like.
include_once VIEWDIR . 'documentation/common/header.php';
include_once VIEWDIR . 'documentation/content/'.$this->view.'.php';
include_once VIEWDIR . 'documentation/common/leftsidebar.php';
include_once VIEWDIR . 'documentation/common/rightsidebar.php';
This is the way i am caching.
ob_start();
include_once('template.php');
$templateCache = ob_get_clean();
Then i store this in a .cache file.
The problem is when i load the template from cache, it is not able to read the php variables.
I know i am doing something wrong but not able to catch it. Please help.