Precis som coredev säger så är det smartast. För att förklara med kod:
PHP-kod:
// Detta skall du cacha
$file = 'hej.php';
$vars = array(
'hej' => 'WN är mysigt'
);
// Det nedan skall du ej cacha
$content = file_get_contents($file);
foreach($vars as $key => $val){
$search[] = '{' . $key . '}';
$replace[] = $val;
}
echo str_replace($search, $replace, $content);