Forums / Developer / cache block question

cache block question

Author Message

A Costello

Wednesday 25 February 2009 11:35:16 am

Here is my situation:
I have a section in my layout that performs a fetch and outputs the content. I would like this section cached until the fetch node being fetched changes. How would I structure that cache-block?

Gaetano Giunta

Wednesday 25 February 2009 3:10:31 pm

See here for more details: http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_functions/miscellaneous/cache_block

A comment on that doc page states that using node id is fine, eg.

{cache-block subtree_expiry=$mynodeID}
    {def $node = fectch(...)}
{/cache-block}

Otherwise you need to know the url alias to yout node and use that instead

Principal Consultant International Business
Member of the Community Project Board