From: erickson Date: Thu, 20 Nov 2008 22:27:48 +0000 (+0000) Subject: remove the caching layer X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2d46924dd4b93960b25b6c925f62531cdc16518c;p=Evergreen.git remove the caching layer git-svn-id: svn://svn.open-ils.org/ILS/trunk@11295 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm b/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm index 98ec62f4b4..2a9683cf65 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/Penalty.pm @@ -12,8 +12,6 @@ use OpenILS::Utils::Fieldmapper; use OpenILS::Const qw/:const/; my $U = "OpenILS::Application::AppUtils"; -my $grp_penalty_thresholds = {}; - # calculate and update the well-known penalties sub calculate_penalties { @@ -88,9 +86,9 @@ sub collect_user_stats { } # get the ranged set of penalties for a give group +# XXX this could probably benefit from a stored proc sub get_group_penalty_thresholds { my($class, $e, $grp_id) = @_; -# return $grp_penalty_thresholds->{$grp_id} if $grp_penalty_thresholds->{$grp_id}; my @thresholds; my $cur_grp = $grp_id; do { @@ -100,7 +98,6 @@ sub get_group_penalty_thresholds { } } while(defined ($cur_grp = $e->retrieve_permission_grp_tree($cur_grp)->parent)); -# return $grp_penalty_thresholds->{$grp_id} = \@thresholds; return \@thresholds; } @@ -109,6 +106,7 @@ sub get_group_penalty_thresholds { # into the fatal_penalties set. Others will be sorted into the info_penalties set sub retrieve_penalties { my($class, $e, $user_id, @fatal_mask) = @_; + my $penalties = $e->search_actor_user_standing_penalty([ {usr => $user_id}, {flesh => 1, flesh_fields => {ausp => ['standing_penalty']}}