use warnings;
use vars qw(@EXPORT);
-use Carp;
-use Date::Calc qw( Date_to_Days Today);
+use Carp qw( croak );
+use Date::Calc qw( Today );
use C4::Context;
use Koha::Caches;
# 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
Koha Physics Library UNLP <matias_veleda@hotmail.com>
=cut
+