Forums / Developer / ezhttp and cache

ezhttp and cache

Author Message

luis muñoz

Tuesday 12 June 2007 1:19:02 am

Hi,

Is there any way for cache to be enabled whe a template receives get params?

I found {set-block scope=root variable=cache_ttl}0{/set-block} to work but it disables cache and that isn´t what i need.

Any help would be apreciated

Luis

André R.

Tuesday 12 June 2007 1:46:46 am

If you use view params the viewcache should handle it correctly.

uri:
some_nice_uri/(my_var)/44/(my_other_var)/yes

code:
{def $myvar = first_set($view_parameters.my_var, 0)}

Using first_set will handle cases where it's not set..

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

luis muñoz

Tuesday 12 June 2007 2:33:45 am

It worked like a charm, thanks