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

eZ debug

Timing: Jan 21 2025 22:40:36
Script start
Timing: Jan 21 2025 22:40:36
Module start 'content'
Timing: Jan 21 2025 22:40:36
Module end 'content'
Timing: Jan 21 2025 22:40:36
Script end

Main resources:

Total runtime0.0248 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.1484180.8125
Module start 'content' 0.00620.0078 769.960994.0547
Module end 'content' 0.01400.0107 864.015670.7031
Script end 0.0247  934.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00239.4100120.0002
Check MTime0.00114.4499120.0001
Mysql Total
Database connection0.00062.401610.0006
Mysqli_queries0.002711.036840.0007
Looping result0.00000.065520.0000
Template Total0.010241.110.0102
Template load0.00093.652910.0009
Template processing0.009337.410110.0093
Override
Cache load0.00062.482510.0006
General
dbfile0.006927.7864100.0007
String conversion0.00000.028930.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs