Optimizing view cache with logged in user

Author Message

Matthieu Sévère

Thursday 10 December 2009 6:14:35 am

Hello !

For an Extranet I am trying to improve general performances of the website. My main problem is that the view cache is re-generated for every user and every user is different (because there are logged in).

Do you have any ideas how to configure the view cache so that it is the same for every user ?

Thanks !

--
eZ certified developer: http://ez.no/certification/verify/346216

Damien Pobel

Thursday 10 December 2009 6:48:15 am

My main problem is that the view cache is re-generated for every user and every user is different (because there are logged in).

In fact, this is partly wrong (with the default settings). the view cache is shared between users that have the same roles. In other words, two users with the same rights will use the same view cache file unless you set some ViewCacheTweaks settings in site.ini/[ContentSettings] (see settings/site.ini for some details)

Anyway, to optimize your site you can try to nest cache-block in view templates or in existing cache-block to cache parts that do not depend on the user rights so generation of new cache files uses parts that are already generated.

You can also try to improve performances at the front end side because the load all the stuff around a page (CSS, image, JS, ...) usually takes 80% of the page load time felt by the user.

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Frédéric DAVID

Thursday 10 December 2009 6:51:27 am

Hello,

You can configure the view cache.

In the file site.ini, you have a variable ViewCacheTweaks in section ContentSettings

For the key global, you can add some parameters in the array, like ignore_view_parameters.

[ContentSettings]
ViewCacheTweks[global]=ignore_userroles;ignore_userlimitedlist.

You have a parameter "pr_user". Maybe this parameter can resolve your problem.

Best Regards

Blog : http://www.frefred.fr/blog/ez-publish
feZ Meta Data : http://projects.ez.no/fezmetadata

Matthieu Sévère

Thursday 10 December 2009 6:58:23 am

That's great, thank you both of you !

@dpobel : front side is already optimized ( ezjscore packing for css and js, png optimization, mod_deflate and mod_gzip on, .. :-) )

I try these tweaks and tell you more ;-)

--
eZ certified developer: http://ez.no/certification/verify/346216

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

Main resources:

Total runtime0.8862 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 589.4766152.6406
Module start 'layout' 0.00630.0036 742.117239.4766
Module start 'content' 0.00980.8749 781.5938604.4766
Module end 'content' 0.88470.0014 1,386.070316.1250
Script end 0.8861  1,402.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4138160.0002
Check MTime0.00160.1847160.0001
Mysql Total
Database connection0.00080.085210.0008
Mysqli_queries0.825293.1198630.0131
Looping result0.00080.0860610.0000
Template Total0.853496.320.4267
Template load0.00200.229620.0010
Template processing0.851496.076220.4257
Template load and register function0.00010.009610.0001
states
state_id_array0.00090.101110.0009
state_identifier_array0.00210.235320.0010
Override
Cache load0.00170.1959310.0001
Sytem overhead
Fetch class attribute can translate value0.00070.084630.0002
Fetch class attribute name0.00150.171170.0002
XML
Image XML parsing0.00130.149430.0004
class_abstraction
Instantiating content class attribute0.00000.001680.0000
General
dbfile0.00100.1164280.0000
String conversion0.00000.001540.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.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: 19
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs