diff --git a/src/Compile/Tag/FunctionClose.php b/src/Compile/Tag/FunctionClose.php index 353c5cca..b7dda8b1 100644 --- a/src/Compile/Tag/FunctionClose.php +++ b/src/Compile/Tag/FunctionClose.php @@ -57,8 +57,10 @@ class FunctionClose extends Base { $_functionCode = $compiler->getParser()->current_buffer; // setup buffer for template function code $compiler->getParser()->current_buffer = new \Smarty\ParseTree\Template(); + $_funcName = "smarty_template_function_{$_name}_{$compiler->getTemplate()->getCompiled()->nocache_hash}"; - $_funcNameCaching = $_funcName . 'Smarty\Compile\Tag\Nocache'; + $_funcNameCaching = $_funcName . '_nocache'; + if ($compiler->getTemplate()->getCompiled()->getNocacheCode()) { $parentCompiler->tpl_function[$_name]['call_name_caching'] = $_funcNameCaching; $output = "