# changed the 'single_holidays' table, lets force/reset its cache
my $cache = Koha::Caches->get_instance();
- $cache->clear_from_cache( 'single_holidays') ;
- $cache->clear_from_cache( 'exception_holidays') ;
+ my $key = $self->{branchcode} . "_holidays";
+ $cache->clear_from_cache($key);
return $self;
# changed the 'single_holidays' table, lets force/reset its cache
my $cache = Koha::Caches->get_instance();
- $cache->clear_from_cache( 'single_holidays') ;
- $cache->clear_from_cache( 'exception_holidays') ;
+ my $key = $self->{branchcode} . "_holidays";
+ $cache->clear_from_cache($key);
return $self;
}
# changed the 'single_holidays' table, lets force/reset its cache
my $cache = Koha::Caches->get_instance();
- $cache->clear_from_cache( 'single_holidays') ;
- $cache->clear_from_cache( 'exception_holidays') ;
+ my $key = $self->{branchcode} . "_holidays";
+ $cache->clear_from_cache($key);
return $self;
}
# changed the 'single_holidays' table, lets force/reset its cache
my $cache = Koha::Caches->get_instance();
- $cache->clear_from_cache( 'single_holidays') ;
- $cache->clear_from_cache( 'exception_holidays') ;
+ my $key = $self->{branchcode} . "_holidays";
+ $cache->clear_from_cache($key);
return $self;
}
# changed the 'single_holidays' table, lets force/reset its cache
my $cache = Koha::Caches->get_instance();
- $cache->clear_from_cache( 'single_holidays') ;
- $cache->clear_from_cache( 'exception_holidays') ;
+ my $key = $self->{branchcode} . "_holidays";
+ $cache->clear_from_cache($key);
return $self;
}
# changed the 'single_holidays' table, lets force/reset its cache
my $cache = Koha::Caches->get_instance();
- $cache->clear_from_cache( 'single_holidays') ;
- $cache->clear_from_cache( 'exception_holidays') ;
+ my $key = $self->{branchcode} . "_holidays";
+ $cache->clear_from_cache($key);
}
# changed the 'single_holidays' table, lets force/reset its cache
my $cache = Koha::Caches->get_instance();
- $cache->clear_from_cache( 'single_holidays') ;
- $cache->clear_from_cache( 'exception_holidays') ;
+ my $key = $self->{branchcode} . "_holidays";
+ $cache->clear_from_cache($key);
}
=head2 isHoliday
], "add fixtures";
my $cache = Koha::Caches->get_instance();
-$cache->clear_from_cache( 'single_holidays' ) ;
-$cache->clear_from_cache( 'exception_holidays' ) ;
+$cache->clear_from_cache('MPL_holidays');
+$cache->clear_from_cache('CPL_holidays');
# 'MPL' branch is arbitrary, is not used at all but is needed for initialization
my $cal = Koha::Calendar->new( branchcode => 'MPL' );
};
END {
- $cache->clear_from_cache( 'single_holidays' ) ;
- $cache->clear_from_cache( 'exception_holidays' ) ;
+ $cache->clear_from_cache('MPL_holidays');
+ $cache->clear_from_cache('CPL_holidays');
};
my $cache = Koha::Caches->get_instance();
$dbh->do(q|DELETE FROM special_holidays|);
$dbh->do(q|DELETE FROM repeatable_holidays|);
-$cache->clear_from_cache('single_holidays');
+my $branches = Koha::Libraries->search();
+for my $branch ( $branches->next ) {
+ my $key = $branch->branchcode . "_holidays";
+ $cache->clear_from_cache($key);
+}
# Start with a clean slate
$dbh->do('DELETE FROM issues');
$schema->storage->txn_rollback;
C4::Context->clear_syspref_cache();
-$cache->clear_from_cache('single_holidays');
+$branches = Koha::Libraries->search();
+for my $branch ( $branches->next ) {
+ my $key = $branch->branchcode . "_holidays";
+ $cache->clear_from_cache($key);
+}
t::lib::Mocks::mock_preference('ReturnBeforeExpiry', 1);
t::lib::Mocks::mock_preference('useDaysMode', 'Days');
-my $cache = Koha::Caches->get_instance();
-$cache->clear_from_cache('single_holidays');
+my $cache = Koha::Caches->get_instance();
+my $key = $branchcode . "_holidays";
+$cache->clear_from_cache($key);
my $dateexpiry = '2013-01-01';
weekday => 6
);
-
-$cache->clear_from_cache('single_holidays');
+$cache->clear_from_cache($key);
$schema->storage->txn_rollback;