mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
improved checking of compiled_include against cached-template with non-cached-chunks
This commit is contained in:
@@ -18,7 +18,6 @@ function smarty_core_process_compiled_include($params, &$smarty)
|
||||
{
|
||||
$_return = $params['results'];
|
||||
foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
|
||||
$smarty->smarty_include($_include_file_path, true);
|
||||
$_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
|
||||
array(&$smarty, '_process_compiled_include_callback'),
|
||||
$_return);
|
||||
|
@@ -91,9 +91,16 @@ function smarty_core_read_cache_file(&$params, &$smarty)
|
||||
}
|
||||
}
|
||||
|
||||
$smarty->_cache_serials = array_merge($smarty->_cache_serials,
|
||||
$smarty->_cache_info['cache_serials']);
|
||||
foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
|
||||
if (empty($smarty->_cache_serials[$_include_file_path])) {
|
||||
$smarty->smarty_include($_include_file_path, true);
|
||||
}
|
||||
|
||||
if ($smarty->_cache_serials[$_include_file_path] != $_cache_serial) {
|
||||
/* regenerate */
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$params['results'] = $cache_split[1];
|
||||
$content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']] = array($params['results'], $smarty->_cache_info);
|
||||
|
||||
|
Reference in New Issue
Block a user