Lines 1070-1077
sub CancelExpiredReserves {
Link Here
|
1070 |
# FIXME To move to Koha::Holds->search_expired (?) |
1070 |
# FIXME To move to Koha::Holds->search_expired (?) |
1071 |
my $holds = Koha::Holds->search($params); |
1071 |
my $holds = Koha::Holds->search($params); |
1072 |
|
1072 |
|
|
|
1073 |
my $cache = Koha::Cache::Memory::Lite->get_instance(); |
1074 |
|
1073 |
while ( my $hold = $holds->next ) { |
1075 |
while ( my $hold = $holds->next ) { |
1074 |
my $calendar = Koha::Calendar->new( branchcode => $hold->branchcode ); |
1076 |
my $cache_key = sprintf "Calendar_CancelExpiredReserves:%s", $hold->branchcode; |
|
|
1077 |
my $calendar = $cache->get_from_cache($cache_key); |
1078 |
if ( !$calendar ) { |
1079 |
$calendar = Koha::Calendar->new( branchcode => $hold->branchcode ); |
1080 |
$cache->set_in_cache( $cache_key, $calendar ); |
1081 |
} |
1075 |
|
1082 |
|
1076 |
# Get the actual expiration date for this hold |
1083 |
# Get the actual expiration date for this hold |
1077 |
my $expiration_date = $hold->expirationdate || $hold->patron_expiration_date; |
1084 |
my $expiration_date = $hold->expirationdate || $hold->patron_expiration_date; |
1078 |
- |
|
|