php - Smarty caching problems with nested templates -


i have problem in caching in nested templates in smarty 3. seems when {include} smarty ignores caching settings of caller template. example, supposing smarty cache has been enabled in controller:

in template1.tpl:

{include file='template2.tpl' nocache} 

in template2.tpl:

{include file='template3.tpl'} 

in template3.tpl

{$smarty.now} 

the {$smarty.now} value displayed on page is, until cache not cleared, equal time of first page visualization, although first subtemplate forced not cached. annoying problem me, since need control caching settings of all content of template2.tpl , subtemplates template1.tpl.

are there elegant workarounds?

smarty not cache content of template2 (move {$smarty.now} their), cache template3. include nocache too.

i experienced same problem , redesign template, i'm able cache of , parts without need of caching surrounded {nocache} content {/nocache}


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -