Forums / Developer / Caching 'includes' from pagelayout_section template

Caching 'includes' from pagelayout_section template

Author Message

Paul Forsyth

Monday 28 April 2003 7:30:13 am

We have a caching problem with includes from within a pagelayout_section.

The layout contains our design along with several includes for a header, footer and a leftmenu, eg:

{include uri="design:page_leftmenu.tpl"}

which picks up the page_leftmenu.tpl within the ''design/user/templates' directory.

As far as we can see we are using all caching options, for example:

ViewCaching=enableCached
ViewModes=full;sitemap
NodeTreeCaching=enabled

we tried adding more view modes to the list but this didn't seem to do anything.

With cache on we find that there are files within 'cache/template/tree' representing our included files. but within 'content/user/' there are only views for the full modes of the classes we are viewing.

As it stands our local machines give out about 30 pages a minute, largely due to the complex left menu we have designed. However, if we move the include for that left menu to the full view for a class and test again we find we get a 3 fold increase to around 90 pages a minute.

We would prefer not to move design elements into each full view in order to get this speed increase. Is there something we are perhaps missing from the ini files that would allow includes from the main pagelayout to be cached in the same way full views are?

btw, we are using php accelerator and ez rev 2356

Thanks

Paul

Paulo Almeida

Monday 28 April 2003 4:22:34 pm

Hi

Is this page_leftmenu.tpl the same o demo? If not could you publish? Do you use $node ?
I have a left_menu if pagelayout without problems.

Paulo Almeida

PACPI.COM Internet Consulting
http://pacpi.com

Paul Forsyth

Tuesday 29 April 2003 12:43:57 am

No, this is our own left menu template.

We don't have any problems with nodes and content but only with the page not being cached as efficiently as the full view. If you have cache on and look inside the php cache files that are generated inside the 'content' directory you will find that 'includes' from a pagelayout are not cached there.

Having an html/php cache for our complex left menu triples our page performance and allows us to meet our clients need for a high bandwidth site.

Paul

Paulo Almeida

Tuesday 29 April 2003 4:34:29 am

Have you tryed cache-block?
After using, i've get ~315 pages per minute, before it used to get <200.

But if you have a multi-site instalation, ez3 will create a fixed directory in var/cache/template-block, I've reported this bug to put template-block in cache directory of each site.

Paulo Almeida

PACPI.COM Internet Consulting
http://pacpi.com

Paul Forsyth

Tuesday 29 April 2003 5:42:19 am

Paulo,

Ahem, humble pie time.

Earlier we did try cache-blocks but didn't find that they worked. However, after trying them again today they now do work... One difference I tried was using an array for the key but im not really sure why that would make the difference. I probably made a mistake the first time. :(

Thanks

Paul

eZ debug

Timing: Jan 30 2025 07:13:36
Script start
Timing: Jan 30 2025 07:13:36
Module start 'content'
Timing: Jan 30 2025 07:13:36
Module end 'content'
Timing: Jan 30 2025 07:13:37
Script end

Main resources:

Total runtime0.3779 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0104 588.0781370.2734
Module start 'content' 0.01050.0164 958.35161,005.5781
Module end 'content' 0.02690.3510 1,963.92973,895.5391
Script end 0.3779  5,859.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00491.3028200.0002
Check MTime0.00160.4285200.0001
Mysql Total
Database connection0.00080.221510.0008
Mysqli_queries0.271471.80561410.0019
Looping result0.00160.42421390.0000
Template Total0.350692.810.3506
Template load0.00100.267710.0010
Template processing0.349592.484610.3495
Override
Cache load0.00070.193910.0007
Sytem overhead
Fetch class attribute can translate value0.00210.552510.0021
XML
Image XML parsing0.00030.082310.0003
General
dbfile0.00952.5047200.0005
String conversion0.00000.001330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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