Forums / Developer / module_result for a specific attribute
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?
ThxPiR
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 all2. 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