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