Always process a part of code despite view cache

Author Message

Paul Etienney

Tuesday 01 June 2010 11:25:38 am

Hello again,

I am sure this question is already answered but i can't find the solution.

My view-cache and template-cache are enabled. I need to process my own operator each time a page is loaded despite the view-cache. I want the rest of the page to be cached.

I tried many things. The most logicial to me was to do this :

{cache-block expiry=1}
{myownoperator()}
{/cache-block}

But it does not work. Any idea ?

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Gaetano Giunta

Tuesday 01 June 2010 2:12:09 pm

1 - hackish way: put your operator in the pagelayout, percolate its results down the page into the node view via javascript (if it non security-sensitive it is often a good idea)

2 - proper way:

- set a cache_tll=0 (or 1) on node template

- add a cache block not around your own operator but around the rest of the page

hope it helps

Principal Consultant International Business
Member of the Community Project Board

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 02:12:59
Script start
Timing: Jan 18 2025 02:12:59
Module start 'layout'
Timing: Jan 18 2025 02:12:59
Module start 'content'
Timing: Jan 18 2025 02:12:59
Module end 'content'
Timing: Jan 18 2025 02:12:59
Script end

Main resources:

Total runtime0.6054 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.0469152.6406
Module start 'layout' 0.00570.0029 740.687539.4766
Module start 'content' 0.00860.5954 780.1641529.7500
Module end 'content' 0.60400.0014 1,309.91418.1250
Script end 0.6054  1,318.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5578160.0002
Check MTime0.00150.2418160.0001
Mysql Total
Database connection0.00100.159210.0010
Mysqli_queries0.559292.3688540.0104
Looping result0.00050.0850520.0000
Template Total0.576295.220.2881
Template load0.00210.340320.0010
Template processing0.574194.823720.2870
Template load and register function0.00010.018510.0001
states
state_id_array0.00180.293010.0018
state_identifier_array0.00130.221220.0007
Override
Cache load0.00170.2881190.0001
Sytem overhead
Fetch class attribute can translate value0.00060.103620.0003
Fetch class attribute name0.00150.253140.0004
XML
Image XML parsing0.00090.156720.0005
class_abstraction
Instantiating content class attribute0.00000.001540.0000
General
dbfile0.00080.1309220.0000
String conversion0.00000.001240.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs