Thanks andrè for tips, now works. But I have another cache understanding problem, I have also a list of file excel file download from fecth in a folder on content structure, I want to show the number of download but with template compile on and content cache on this count does not update.
this is my code for the link download inside a foreach:
First of all, you should remove that cache block (cache blocks introduce overhead as well, so you should not use them inside a foreach like that), you problem is probably that this code is inside another cache block or view cache.
Introduction to cache blocks:
{cache-block expiry=3600 ignore_content_expiry}
{cache-block expiry=20}
This code will update every hour {currentdate()|l10n( 'shortdatetime' )}
{/cache-block}
{/cache-block}
Same goes for content view cache ( inside a view/full node template ):
{set-block scope=global variable=cache_ttl}3600{/set-block}
{cache-block expiry=20}
This code will update every hour {currentdate()|l10n( 'shortdatetime' )}, unless this node is edited!
{/cache-block}
The text will only update if the node is edited if cache_ttl is not explicit set, and text will update every 20 seconds if cache_ttl is set to 0 (disable view cache).