Forums / Developer / module_result for a specific attribute

module_result for a specific attribute

Author Message

Pierre Tissot

Thursday 18 October 2007 8:31:10 am

Hi,

I have a site that is user custom attribute dependent, for the cache block I don't have any trouble, I use like this and works well for each user:

{cache-block keys=array($current_user.contentobject.data_map.mysetting.content)}
.......
{/cache-block} 

The problem is regarding the view cahe in {$module_result}, all the users have the same group and permissions, so I guess that it's why once the cache is build all the users will shares the same setting....and this is wrong for my site.
Is that possible to control view cache like we do with cache-blocks? Or like we do to user country or user currency but this time with a custom attribute?

Thx
PiR

Damien Pobel

Thursday 18 October 2007 11:00:43 am

Hi Pierre,

You have 2 solutions :
1. insert a {set-block scope=rot variable=cache_ttl}0{/set-block} to disable ViewCache in view templates and then put a cache-block instead. cache-block performs less than ViewCache but it's better than no cache at all
2. ViewCache is based on user's roles. Same roles give same cache file so if you change role for some users, they will get another cache file. Perhaps it's not possible in your case.

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

Ɓukasz Serwatka

Friday 19 October 2007 7:43:38 am

You did not write in details about functionality you need, but looks it should be possible to use ezpreference() which works fine with view cache enabled.

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/data_and_information_extraction/ezpreference

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

eZ debug

Timing: Jan 31 2025 03:44:04
Script start
Timing: Jan 31 2025 03:44:04
Module start 'content'
Timing: Jan 31 2025 03:44:04
Module end 'content'
Timing: Jan 31 2025 03:44:04
Script end

Main resources:

Total runtime0.2070 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.0067 588.0313370.2891
Module start 'content' 0.00670.0133 958.32031,001.6563
Module end 'content' 0.01990.1870 1,959.97663,890.4922
Script end 0.2069  5,850.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00442.1458200.0002
Check MTime0.00140.6706200.0001
Mysql Total
Database connection0.00070.316010.0007
Mysqli_queries0.110853.53561410.0008
Looping result0.00140.69201390.0000
Template Total0.186690.210.1866
Template load0.00080.408710.0008
Template processing0.185889.746210.1858
Override
Cache load0.00060.280110.0006
Sytem overhead
Fetch class attribute can translate value0.00190.940310.0019
XML
Image XML parsing0.00030.133910.0003
General
dbfile0.00874.1853200.0004
String conversion0.00000.001830.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