Author Topic

Kristian Hole

Sunday 10 September 2006 11:21:35 pm

Comment46102

Hi Thomas,

As far as i understand, you need to use the "page-limit" as a key to your cache-block, and maybe in addition the user-id.

that would be something like
{cache-block keys=array( $node.path_string, ezhttp('SearchPageLimit','get' ),
$current_user.contentobject_id) }

This will ensure that a unique result for the cache block is generated for each searchpagelimit and user-id.

If you look in the admin-interface, the ezpreference is used instead of get parameters. Look in the following pages:

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/data_and_information_extraction/ezhttp

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

This will only work in the pagelayoutl. $current_user is only available there. And in the node-view templates (node/view*.tpl and overrides ) the viewcaching will add aditional caching which will affect your results.

Which templates are you actually adding this code?

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute