Monday 26 April 2004 12:38:12 am
Hi. I've got this code running in order to display a random profile.
{cache-block expiry=60}
{let randomised_array=fetch('content','tree', hash('parent_node_id', '77',
class_filter_type, "include", class_filter_array, array(17)))|shuffle}
{section name=random loop=$randomised_array max=1}
{node_view_gui view=element content_node=$random:item} </br>
{/section}
{/let}
{/cache-block}
With the expiry set to 60, it takes 60 seconds before the profile changes on a refresh. My problem is when I raise the expiry to i.e. 86400, because I want this profile to change once a day. When using this expiry, the cache block doesn't work at all. A new random profile i s loaded on every reload. This code is situated in my pagelayout.tpl. Any ideas? Regards Bjørn
|