mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Apply object cache to ncenterliteModel->_getNewCount()
알림이 많이 쌓여 있는 경우 푸시앱 등 알림센터에 직접 접근하는 서드파티 자료에서 알림 수를 가져올 때 부하가 발생함. 이미 알림 목록을 캐싱하도록 되어 있으므로 캐시를 활용하여 불필요한 SELECT COUNT(*) 쿼리를 하지 않도록 개선함.
This commit is contained in:
parent
2dd549f076
commit
285ea8a8ed
1 changed files with 7 additions and 0 deletions
|
|
@ -361,6 +361,13 @@ class ncenterliteModel extends ncenterlite
|
|||
$member_srl = $logged_info->member_srl;
|
||||
}
|
||||
|
||||
$cache_key = sprintf('ncenterlite:notify_list:%d', $member_srl);
|
||||
$output = Rhymix\Framework\Cache::get($cache_key);
|
||||
if($output !== null)
|
||||
{
|
||||
return $output->total_count;
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->member_srl = $member_srl;
|
||||
$output = executeQuery('ncenterlite.getNotifyNewCount', $args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue