Trouble with cache-block expiry

Author Message

Bjørn Kaarstein

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.