Share » Forums » Developer » Problems with cache-blocks and...

Problems with cache-blocks and layout/set link generation?

Problems with cache-blocks and layout/set link generation?

Thursday 20 July 2006 10:13:28 am - 7 replies

Author Message

Kristian Hole

Wednesday 26 July 2006 9:09:39 am

Hi Massimiliano,

I have not seen this, but i can imagine one reason for this: Do you use the print-layout on the site?

If the cache is regenerated at the exact moment when somebody views the print layout, that will be stored and used for later, since that is not part of the keys to the cacheblock.

I think you can also use $link.object.data_map.nome_abbreviato.has_content instead of the counting?

Cheers
-Kristian

Kristian

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

Kristof Coomans

Wednesday 26 July 2006 9:48:35 am

Hello Kristian

Is there a way to add $eZSys->AccessPath (see eZSys::addAccessPath used by the layout/set view) to the cache block keys?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Kristian Hole

Wednesday 26 July 2006 10:14:41 am

Hi Kristof,

I actually do not know.

But one option would be to use $link.url|ezurl as a cache key, since that includes the layout/set if that is active. Maybe cheating a little, but it should work...

Kristian

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

Kristian Hole

Wednesday 26 July 2006 10:26:02 am

In the pagelayout you can ofcourse use $module_result.requested_uri_string (if i remember the correct name of the variable) as a cache key, but that does not work inside the node-view-template which is what he is using here.

Kristian

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

Massimiliano Bariola

Thursday 27 July 2006 1:19:48 am

Hi Kristian and Kristof,

indeed we do use print layouts on some other templates, but those templates refer to node-view tempates, while the template shown here is for a dummy node (used to display info about other nodes spread over the content tree). So I think that at least the $node.node_id value should be different thus differentiating the cache block keys.

Anyway, I will try that $link.url|ezurl trick and see if it solves the problem (if it's usable from a node-view tpl)

Thanks for now, I'll keep you posted

Massimiliano

Massimiliano Bariola

Thursday 27 July 2006 2:34:04 am

I tried the $link but it seems it is not defined in nodeview templates. I don't seem to be able to access that info anywhere else in the $node variable. any help?

Kristian Hole

Thursday 27 July 2006 8:24:46 am

Sorry, my bad.

I ment to use "$node.url|ezurl(no)" as a key.

The (no) is just to remove the quotes which ezurl adds.

Kristian

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu