Forums / Developer / Optimizing view cache with logged in user

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