Convert - Cache

Author Message

John Smith

Friday 05 December 2008 12:56:11 am

Hi there,

Hope someone can help me. Version 4.0.0 - In one of pages I have written a template script to display latest 5 news items (with title, short description and an image) from the NEWS section. Before that script I have disabled the cache with the following line, because when I am uploading an article in the NEWS section, the 5 latest items are not being updated. It is working fine if I write the following code before the script.

{set-block scope=root variable=cache_ttl}0{/set-block}

Yesterday I was checking the performance and time taken to load the page in which the latest 5 news items are being displayed. Every time I refresh the page, I can see CONVERT command being executed. I think this is for the resizing the images in the 5 news items. Is there any way to stop executing CONVERT everytime when somebody loads the page. I know this is because of SET-BLOCK statement, but if I am not writing it, the news items are not getting updated...

All this is not happening in the News section itself.

Please help.

Carlos Revillo

Friday 05 December 2008 1:31:04 am

I think you should define some rules in viewcache.ini.append.php to solve this.

you should delete the {set-block scope=root variable=cache_ttl}0{/set-block} at the top.

and tell ez to clear the cache for this page only if a new is published.

Take a look at http://ez.no/doc/ez_publish/technical_manual/4_0/features/view_caching/smart_view_cache_cleaning

So, you can try something like

[article]
AdditionalObjectIDs[]
AdditionalObjectIDs[]=64

where "article" is the identifier of your "news" class and 64 is the object id of the node where you have that news list.

This way, viewcache for this node will be cleaned only when you publish a new.

Hope it helps.

David Suela

Friday 05 December 2008 1:39:13 am

I think there is a bug in ezpublish 4.0.0 with this (http://issues.ez.no/IssueView.php?Id=12386&activeItem=3). Try to update to 4.0.1, or get the last kernel/classes/datatypes/ezimage/ezimagealiashandler.php

xsto.info <el acceso a la información>
http://xsto.info
http://dominios.coop

Arnaud Lafon

Friday 05 December 2008 1:44:51 am

If you disable content view caching, then you should use the cache-block template function.
There are parameters (subtree_expiry and keys for example) that would be interesting to use : http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_functions/miscellaneous/cache_block

Looking for information about SQLI ?
Looking for a new job in Paris ?
Please contact me at alafon [at] sqli [dot] com

André R.

Friday 05 December 2008 1:55:37 am

Of course, but that will never be as fast as taking advantage of the view cache system.
We did some benchmarks recently and got something like:
~130 request/sec with view cache
~90 request/sec with view cache disabled and all but the line disabling the view cache inside a cache block
~32 request/sec with view disabled and no cache block in the node template

Pagelayout was tweaked so only a few lines where outside the two 'root' cache blocks (one for header and one for footer).
The numbers where using eZ Publish trunk (4.1, 4.0.1 was about ~8% behind) on a quad-core Xeon 2.5GHz.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

John Smith

Friday 05 December 2008 8:50:41 am

Thanks Carlos Revillo, David Suela.

Enabled smart cache and uploaded the latest version of kernel/classes/datatypes/ezimage/ezimagealiashandler.php file from the SVN.

It is working fine.

Cheers,

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:36:35
Script start
Timing: Jan 18 2025 10:36:35
Module start 'layout'
Timing: Jan 18 2025 10:36:35
Module start 'content'
Timing: Jan 18 2025 10:36:35
Module end 'content'
Timing: Jan 18 2025 10:36:35
Script end

Main resources:

Total runtime0.7130 sec
Peak memory usage4,096.0000 KB
Database Queries72

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.7813152.6094
Module start 'layout' 0.00720.0036 740.390639.3984
Module start 'content' 0.01080.7004 779.7891685.9063
Module end 'content' 0.71120.0017 1,465.695316.2031
Script end 0.7129  1,481.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4632160.0002
Check MTime0.00140.1906160.0001
Mysql Total
Database connection0.00190.260310.0019
Mysqli_queries0.647190.7642720.0090
Looping result0.00080.1189700.0000
Template Total0.677595.020.3387
Template load0.00210.291320.0010
Template processing0.675494.731420.3377
Template load and register function0.00020.028210.0002
states
state_id_array0.00150.212810.0015
state_identifier_array0.00140.194120.0007
Override
Cache load0.00180.2551390.0000
Sytem overhead
Fetch class attribute can translate value0.00090.126050.0002
Fetch class attribute name0.00110.161180.0001
XML
Image XML parsing0.00210.296450.0004
class_abstraction
Instantiating content class attribute0.00000.001780.0000
General
dbfile0.00100.1354240.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs