if (!file_exists($compiledFilePath)) { // <---- IF THIS IS NOT TRUE $vc = new FwViewCompiler(); if (FW_DEBUG) FwDebug::addClassInfo($prependDebugMsg.'[recompiled: missing]', $compiledFilePath, 'miss'); return $vc->compile($sourceFilePath, $compiledFilePath, $isPartial); // cache old compared to source // (notice we store filemtime of the cache since we may use it a bit later) } else if (filemtime($sourceFilePath) > ($compiledMTime = filemtime($compiledFilePath))) { $vc = new FwViewCompiler(); if (FW_DEBUG) FwDebug::addClassInfo($prependDebugMsg.'[recompiled: older]', $compiledFilePath, 'miss'); return $vc->compile($sourceFilePath, $compiledFilePath, $isPartial); // we'll now load the static dependencies and mktime them against the cache } else { // <---- IT GOES DIRECTLY ON THIS ELSE (SKIPPING THE PREVIOUS ONE !?!?) $staticDep = require(str_replace('.php','.sdp.php',$compiledFilePath)); $cacheIsOld = false; foreach($staticDep as $item) { if (filemtime($item) > $compiledMTime) { $cacheIsOld = true; break; } }