Forums / Setup & design / System cache hints on recursive left tree menu ?

System cache hints on recursive left tree menu ?

Author Message

H-Works Agency

Wednesday 23 November 2005 11:24:01 am

I still don't understand the ezp cache system.

How can i clear only one page cache manually after having changed static elements on this page ?

Would be something like :

clearcache --page=/homepage

Second thing is when i turn cache to 'enabled' two main problems occurs :

- My left infinite level tree menu that use a recurisve self insertion of navleft.tpl stops on first level when cache is activated.

The code is like this in navleft.tpl :


<ul>
{foreach $child}
<li>
{$child.name}
{if $subchild}{insert 'navleft.tpl'}{/if}
</li>
{/foreach}
</ul>

Is there a special rule to be able to activate cache with such a menu ?

- The second is that i have a news ticker on my homepage that never update when cache is on. But all pages except this one updates normally. Why the homepage is acting differently ?

This news ticker is taking its content from another node (/news/ actually) through a 'fetch list news_folder_id' but doesn't reflect its content until i clear content cache.

Thanx for your help.

Martin
ezp7.1 - Apache2 - Mysql4 - php4

EZP is Great

Ɓukasz Serwatka

Thursday 24 November 2005 12:14:30 am

> How can i clear only one page cache
> manually after having changed static
> elements on this page ?

This can be solved via php script:


run from ez root (make sure that it is executable)

./bin/php/ezcontentcache.php --clear-subtree=/homepage

For your tree menu you should use cache-block with subtree_expiry parameter, look here

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_functions/miscellaneous/cache_block

Hope it will help you.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

H-Works Agency

Thursday 24 November 2005 12:30:02 am

Ok thanx Lukasz, gonna try those things.

Martin

EZP is Great