I like to cache my page with
public function filters() {
return array(
array(
'COutputCache',
'duration' => 60,
'varyByExpression' => $this->region,
'varyByParam' => array('id', 'region'),
),
);
}
It worked fine, but I have different pages when changing the parameter $this->region.
Its a global parameter in the Controller.php. This parameter remembers my current location:
One page is for New York, the other page for Los Angelos. When giving the paramter in the URL:
www.xyz.com/region/New-York it is fine and the page for New York is loaded, but when I only have www.xyz.com (and Los Angelos is in the cache), then the page changes to Los Angelos, although in $this->region is New York.
I hope somebody wil understand this and can help me…