Forums / Setup & design / ViewCache & Get Parameters / Comment65417
H-Works Agency
Monday 31 January 2011 11:33:07 am
If it can help someone this is how i cached my view with Get Parameters and it seems to work pretty good :
{set-block variable=cache_ttl}0{/set-block} {def $key=$node.node_id $extraNodeID=ezini('Search', 'extraNodeID', 'variables.ini') } {if ezhttp_hasvariable('filter', 'get')} {set $key=concat($key, ezhttp( 'filter', 'get' )|implode(''))} {/if} {if ezhttp_hasvariable('activeFacets', 'get')} {set $key=concat($key, ezhttp( 'activeFacets', 'get' )|implode(''))} {/if} {set $key=$key|md5()} {if is_set($extraNodeID[0])} {set $extraNodeID=$extraNodeID[0]} {/if} {cache-block keys=array($key, $view_parameters.offset) subtree_expiry=$extraNodeID}
After this i have my normal interface DOM.
This template is special because my content class hold a 'query' attribute to allow dynamic content selection with ezfind.
Thats why i use facets GET parameters for now.
EZP is Great