disable cache doesn't work

Author Message

Emmanuel Averty

Tuesday 12 April 2011 7:56:39 am

Hi,
In my eZ Publish site, I want a page showing its sub-elements with their own sub-elements count. For example :
object1 : 3 elements
object2 : 5 elements
object1 and object2 are instance of a class I made (marque_non_classee).
To override the line representing my object I added in my override.ini.append.php :
[line_nom_nb_enfants]
Source=node/view/line.tpl
MatchFile=line/nom_nb_enfants.tpl
Subdir=templates
Match[class_identifier]=marque_non_classee
And it works !
But if I move a sub-element of object1 to another place, the count doesn't change. So I added :
{set-block scope=root variable=cache_ttl}0{/set-block}
to nom_nb_enfants.tpl, but the children count still doesn't change.
Is it a bug ?

Quoc Huy Nguyen Dinh

Wednesday 13 April 2011 8:46:27 am

From your Source=node/view/line.tpl I guess you are using {node_view_gui...} to load the line.tpl file inside a full view tpl file (override/template/full/myclass.tpl for example). In that case {set-block scope=root variable=cache_ttl}0{/set-block} won't work as the output of line.tpl is cached inside the cache of {myclass.tpl}

Add it to the calling tpl file as well, or use Ajax (jquery/yui) to fetch the numbers and still benefit of the view caching.

Emmanuel Averty

Thursday 14 April 2011 12:01:38 am

Thank you for your reply. You're right, I use node_view_gui. In fact, the calling template is the ezwebin basic folder template. I think I'll overwrite this template for this node in order to add {set-block scope=root variable=cache_ttl}0{/set-block}.

But, I don't understand what you mean about the Ajax method. Do you mean I can access eZ Publish objects through javascript ?

Emmanuel Averty

Monday 18 April 2011 3:20:55 am

I understood how to make an ajax fetching. Thank you for the idea.

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

eZ debug

Timing: Jan 18 2025 10:41:38
Script start
Timing: Jan 18 2025 10:41:38
Module start 'layout'
Timing: Jan 18 2025 10:41:38
Module start 'content'
Timing: Jan 18 2025 10:41:38
Module end 'content'
Timing: Jan 18 2025 10:41:38
Script end

Main resources:

Total runtime0.7193 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0089 589.3438152.6250
Module start 'layout' 0.00890.0048 741.968839.4531
Module start 'content' 0.01370.7040 781.4219511.8203
Module end 'content' 0.71770.0016 1,293.242212.1641
Script end 0.7192  1,305.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5124160.0002
Check MTime0.00140.1909160.0001
Mysql Total
Database connection0.00090.130010.0009
Mysqli_queries0.667792.8257600.0111
Looping result0.00050.0752580.0000
Template Total0.673893.720.3369
Template load0.00210.294720.0011
Template processing0.671793.387320.3359
Template load and register function0.00010.012210.0001
states
state_id_array0.00140.200710.0014
state_identifier_array0.00120.161020.0006
Override
Cache load0.00170.2418280.0001
Sytem overhead
Fetch class attribute can translate value0.00100.136420.0005
Fetch class attribute name0.00230.313850.0005
XML
Image XML parsing0.00070.097120.0003
class_abstraction
Instantiating content class attribute0.00000.001450.0000
General
dbfile0.00110.1575160.0001
String conversion0.00000.002040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs