bug fixes and caching improvements
This commit is contained in:
parent
48a8934b3b
commit
91d950e5f7
6 changed files with 95 additions and 47 deletions
|
|
@ -15,10 +15,11 @@ package WebGUI::Grouping;
|
|||
=cut
|
||||
|
||||
use strict;
|
||||
use WebGUI::Cache;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::ErrorHandler;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::ErrorHandler;
|
||||
use WebGUI::Utility;
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -252,7 +253,11 @@ sub getGroupsInGroup {
|
|||
} elsif (exists $session{gotGroupsInGroup}{recursive}{$groupId}) {
|
||||
return $session{gotGroupsInGroup}{direct}{$groupId};
|
||||
}
|
||||
my $groups = WebGUI::SQL->buildArrayRef("select groupId from groupGroupings where inGroup=".quote($groupId));
|
||||
my $groups = WebGUI::Cache->new("groups_in_group_".$groupId)->get;
|
||||
unless (defined $groups) {
|
||||
$groups = WebGUI::SQL->buildArrayRef("select groupId from groupGroupings where inGroup=".quote($groupId));
|
||||
WebGUI::Cache->new("groups_in_group_".$groupId)->set($groups);
|
||||
}
|
||||
if ($isRecursive) {
|
||||
$loopCount++;
|
||||
if ($loopCount > 99) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue