Share » Forums » Setup & design » Cache-block leading to Ez cache...

Cache-block leading to Ez cache consistently serving dirty pages?

Cache-block leading to Ez cache consistently serving dirty pages?

Wednesday 29 October 2003 8:35:35 am - 2 replies

Modified on Wednesday 29 October 2003 8:37:03 am by Tore Skobba

Author Message

Vivienne van Velzen

Thursday 30 October 2003 1:15:28 am

Hi Tore,

Do you use a fetch to get the current_user? I.e. "current_user=fetch('user','current_user')".
I'm using this method as well to show different blocks for anonymous users and users who are logged in, and otherwise I can't see anything wrong with your code.
Greetings,

Vivienne

Tore Skobba

Thursday 30 October 2003 2:26:32 am

Hi

I do not use fetch to get the current user, this as I do not belive you need it, i.e. only {$current_user.contentobject.id} displays the id of the user. However, my stuff seems to work fine now, the reason might have been that I was editing the wrong cache block:

{cache-block keys=array('page_menu',$uri_string,$current_user.contentobject.id) }
{include uri="design:page_menu.tpl"}
{/cache-block}

Where page_menu.tpl is a template which first display menu links and sub menus. Then it imports another template which displays user info (login or log out etc.). This now seems to work very fine:)

But some docs on cache-block function would have been very nice.
Cheers
Tore

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu