mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-20 02:42:23 +09:00
Cache grant information for modules and documents
https://www.xetown.com/qna/374223 http://sejin7940.co.kr/xe_tips/108198
This commit is contained in:
parent
4175535bc3
commit
9d594526b4
2 changed files with 43 additions and 9 deletions
|
|
@ -1862,6 +1862,13 @@ class moduleModel extends module
|
|||
*/
|
||||
function getGrant($module_info, $member_info, $xml_info = '')
|
||||
{
|
||||
$cache_key = sprintf('site_and_module:module_grant:%d:%d', $module_info->module_srl, $member_info->member_srl);
|
||||
$grant = Rhymix\Framework\Cache::get($cache_key);
|
||||
if ($grant !== null)
|
||||
{
|
||||
return $grant;
|
||||
}
|
||||
|
||||
$grant = new stdClass();
|
||||
|
||||
if(!$xml_info)
|
||||
|
|
@ -2014,6 +2021,9 @@ class moduleModel extends module
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set to cache and return
|
||||
Rhymix\Framework\Cache::set($cache_key, $grant, 0, true);
|
||||
return $grant;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue