I need one of my controller action to be cached.
I added “Cache” to my $helpers variable.
And my action is like this:
public function myAction($name) {
$this->cacheAction = '10 minutes';
//some code
}
I run this action, then added one line of echo. And run action again.
But the result became dfferent, although action was cached.
How can I debug this issue?
I checked this.
Uncomment
Configure::write('Cache.check', true);inapp/Config/core.phpAlso I’m not sure if doing it in the action itself will work. If it doesn’t add this instead to your controller as a class var.