Share » Forums » Setup & design » Cache-block and ezhttp get variables...

Cache-block and ezhttp get variables problem

Cache-block and ezhttp get variables problem

Thursday 29 November 2007 12:47:41 am - 3 replies

Modified on Thursday 29 November 2007 12:49:22 am by Radek Kuchta

Author Message

Hans Melis

Thursday 29 November 2007 2:44:37 am

First thing I notice (it could just as well be a typo in your post) is that you use <b>key=</b> in the cache block statement, but the documentation says it's <b>keys=</b>.

If the typo is only in your post, what is the value of $get1 to $get4? Do those variables contain the name of the GET variable or do they contain the value of the GET variable?

Hans
http://blog.hansmelis.be

Paul Leclercq

Thursday 29 November 2007 3:14:08 am

personnaly I would drop the idea of using that line altogether:
{set-block scope=root variable=cache_ttl}0{/set-block}

This will simply remove the cache on your page, and will really require far too much processing power on your servers. and then re-include the cache manually, for a set of area.

You would be better off, converting your parameters into view_parameters if you can:
http://ez.no/doc/ez_publish/technical_manual/3_10/templates/basic_template_tasks

Or create a module view extension to collect the information from your form. That way you can collect the information in the script of the page, and cache the result page.
http://ez.no/fr/ezpublish/documentation/development/extensions/building_an_ez_publish_module

If you really want to use cache blocks, you would be better of using it the other way round. use a cache-block to unset the cache for one area, not for the entire page and then ressetting it for every part.

Radek Kuchta

Thursday 29 November 2007 3:20:39 am

Hi Hans,

Statement "key" was a typo only. I'm using keys array.

$get1 - $get4 variables contain the value of ezhttp get variable (if it is set, if no then the value is eq 0). For exemple code before cache-block:

{if ezhttp_hasvariable( 'name_1, 'get' )}
	{set $get1 = ezhttp( 'name_1', 'get' )}
{else}
	{set $get1 = 0}
{/if}

http://ez.no/certification/verify/272582

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

36 542 Users on board!

Forums menu