Commit e6068d9999c7b9e433d568b89b6076277ec24ac7
1 parent
0ce14eb6
Use caching for Group::getList
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5069 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
0 deletions
lib/groups/Group.inc
| @@ -127,6 +127,9 @@ class Group extends KTEntity { | @@ -127,6 +127,9 @@ class Group extends KTEntity { | ||
| 127 | function getList($sWhereClause = null, $aOptions = null) { | 127 | function getList($sWhereClause = null, $aOptions = null) { |
| 128 | if(!is_array($aOptions)) $aOptions = array($aOptions); | 128 | if(!is_array($aOptions)) $aOptions = array($aOptions); |
| 129 | $aOptions['orderby'] = KTUtil::arrayGet($aOptions, 'orderby', 'name'); | 129 | $aOptions['orderby'] = KTUtil::arrayGet($aOptions, 'orderby', 'name'); |
| 130 | + if (is_null($sWhereClause)) { | ||
| 131 | + $aOptions['cache'] = 'getList'; | ||
| 132 | + } | ||
| 130 | return KTEntityUtil::getList2('Group', $sWhereClause, $aOptions); | 133 | return KTEntityUtil::getList2('Group', $sWhereClause, $aOptions); |
| 131 | } | 134 | } |
| 132 | 135 |