CakePHP2でのElementキャッシュで見た目から処理を減らしていく ref: http://qiita.com/ikuwow/items/bf2e0e4c2ca289a3655d
$ranking = $this->requestAction([
'controller' => 'Users',
'action' => 'getUserRanking'
]);
$this->Element('user_ranking', [], [
'cache' => true
]);
public function getUserRanking() {
if ($this->request->is('requested')) {
// requestAction()時のみrankingを返す
return $this->UserRanking->getUserRanking();
}
throw new BadRequestException();
}