diff --git a/change_log.txt b/change_log.txt index 39f8d9f6..2fa1f34f 100644 --- a/change_log.txt +++ b/change_log.txt @@ -2,6 +2,7 @@ 24.05.2012 - bugfix Smarty_Internal_Write_File::writeFile() could cause race-conditions on linux systems (Issue 101) - bugfix attribute parameter names of plugins may now contain also "-" and ":" (Forum Topic 21856) +- bugfix add compile_id to cache key of of source (Issue 97) 22.05.2012 - bugfix recursive {include} within {section} did fail (Smarty developer group) diff --git a/libs/sysplugins/smarty_resource.php b/libs/sysplugins/smarty_resource.php index 7c1cea13..683120eb 100644 --- a/libs/sysplugins/smarty_resource.php +++ b/libs/sysplugins/smarty_resource.php @@ -254,7 +254,7 @@ abstract class Smarty_Resource { } } } - + $_stream_resolve_include_path = function_exists('stream_resolve_include_path'); // relative file name? @@ -271,7 +271,7 @@ abstract class Smarty_Resource { } else { $_filepath = Smarty_Internal_Get_Include_Path::getIncludePath($_filepath); } - + if ($_filepath !== false) { if ($this->fileExists($source, $_filepath)) { return $_filepath; @@ -493,6 +493,9 @@ abstract class Smarty_Resource { // check runtime cache $_cache_key = 'template|' . $unique_resource_name; + if ($smarty->compile_id) { + $_cache_key .= '|'.$smarty->compile_id; + } if (isset(self::$sources[$_cache_key])) { return self::$sources[$_cache_key]; }