$frameworkcode = "" unless $frameworkcode;
$forlibrarian = $forlibrarian ? 1 : 0;
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
my $cache_key = "MarcStructure-$forlibrarian-$frameworkcode";
my $cached = $cache->get_from_cache($cache_key);
return $cached if $cached;
$frameworkcode //= '';
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
my $cache_key = "MarcSubfieldStructure-$frameworkcode";
my $cached = $cache->get_from_cache($cache_key);
return $cached if $cached;
# changed the 'single_holidays' table, lets force/reset its cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
$cache->clear_from_cache( 'exception_holidays') ;
$self->{'exception_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
# changed the 'single_holidays' table, lets force/reset its cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
$cache->clear_from_cache( 'exception_holidays') ;
$self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
# changed the 'single_holidays' table, lets force/reset its cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
$cache->clear_from_cache( 'exception_holidays') ;
$self->{'exception_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
# changed the 'single_holidays' table, lets force/reset its cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
$cache->clear_from_cache( 'exception_holidays') ;
}
# changed the 'single_holidays' table, lets force/reset its cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
$cache->clear_from_cache( 'exception_holidays') ;
$sth->execute($self->{branchcode}, $options{day}, $options{month}, $options{year});
# changed the 'single_holidays' table, lets force/reset its cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
$cache->clear_from_cache( 'exception_holidays') ;
$sth->execute($self->{branchcode}, $options{day}, $options{month}, $options{year});
# changed the 'single_holidays' table, lets force/reset its cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
$cache->clear_from_cache( 'exception_holidays') ;
}
=cut
-my $syspref_cache = Koha::Cache->get_instance();
+my $syspref_cache = Koha::Caches->get_instance();
my $use_syspref_cache = 1;
sub preference {
my $self = shift;
my $cache;
- eval { $cache = Koha::Cache->get_instance() };
+ eval { $cache = Koha::Caches->get_instance() };
my $token;
$cache and $token = $cache->get_from_cache( "overdrive_token" ) and return $token;
sub _build_default_values_for_mod_marc {
my ($frameworkcode) = @_;
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
my $cache_key = "default_value_for_mod_marc-$frameworkcode";
my $cached = $cache->get_from_cache($cache_key);
return $cached if $cached;
C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
my $cache_key =
"AuthorisedValues-$category-$opac-$branch_limit";
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
my $result = $cache->get_from_cache($cache_key);
return $result if $result;
sub get_yaml {
my $yml_path = C4::Context->config('intranetdir') . '/admin/columns_settings.yml';
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
my $yaml = $cache->get_from_cache('ColumnsSettingsYaml');
unless ($yaml) {
sub exception_holidays {
my ( $self ) = @_;
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
my $cached = $cache->get_from_cache('exception_holidays');
return $cached if $cached;
sub single_holidays {
my ( $self, $date ) = @_;
my $branchcode = $self->{branchcode};
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
my $single_holidays = $cache->get_from_cache('single_holidays');
# $single_holidays looks like:
}
else {
require Koha::Cache;
- $cache = Koha::Cache->get_instance();
+ $cache = Koha::Caches->get_instance();
}
my $self = bless {
CACHE => $cache,
my $input = new CGI;
my $frameworkcode = $input->param('frameworkcode') || q||;
my $op = $input->param('op') || q|list|;
-my $cache = Koha::Cache->get_instance();
+my $cache = Koha::Caches->get_instance();
my @messages;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
}
my $dbh = C4::Context->dbh;
-my $cache = Koha::Cache->get_instance();
+my $cache = Koha::Caches->get_instance();
################## ADD_FORM ##################################
# called by default. Used to create form to add or modify a record
debug => 1,
}
);
-my $cache = Koha::Cache->get_instance();
+my $cache = Koha::Caches->get_instance();
my $op = $input->param('op') || "";
$tagfield =~ s/\,//g;
my $script_name = "/cgi-bin/koha/admin/marctagstructure.pl";
my $dbh = C4::Context->dbh;
-my $cache = Koha::Cache->get_instance();
+my $cache = Koha::Caches->get_instance();
# open template
my ($template, $loggedinuser, $cookie)
my @sql_params = $query->param('sql_params');
-my $cache = Koha::Cache->get_instance();
+my $cache = Koha::Caches->get_instance();
my $cache_active = $cache->is_cache_active;
my ($cache_key, $json_text);
if ($cache_active) {
}
);
-my $cache = Koha::Cache->get_instance();
+my $cache = Koha::Caches->get_instance();
my $cache_active = $cache->is_cache_active;
my ($cache_key, $json_text);
if ($cache_active) {
],
], "add fixtures";
-my $cache = Koha::Cache->get_instance();
+my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
# 'MPL' branch is arbitrary, is not used at all but is needed for initialization
$sth->execute($hidden_value);
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->flush_all(); # easy way to ensure DB is queried again.
my $processor = Koha::RecordProcessor->new(
$dbh->do('INSERT INTO marc_subfield_structure (tagfield, tagsubfield, frameworkcode) VALUES (?, "z", ?)', undef, $itemfield, $frameworkcode);
# Clear cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache("MarcStructure-0-$frameworkcode");
$cache->clear_from_cache("MarcStructure-1-$frameworkcode");
$cache->clear_from_cache("default_value_for_mod_marc-$frameworkcode");
|, undef, $framework->{frameworkcode} );
# And make sure the caches are cleared
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache("MarcStructure-0-" . $framework->{frameworkcode});
$cache->clear_from_cache("MarcStructure-1-" . $framework->{frameworkcode});
$cache->clear_from_cache("default_value_for_mod_marc-" . $framework->{frameworkcode});
}
}
# we updated the single_holidays table, so wipe its cache
- my $cache = Koha::Cache->get_instance();
+ my $cache = Koha::Caches->get_instance();
$cache->clear_from_cache( 'single_holidays') ;
}