use JSON;
use CGI qw ( -utf8 );
-use Koha::Cache;
+use Koha::Caches;
my $query = CGI->new();
}
);
-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) {
# convert SQL parameters to placeholders
$sql =~ s/(<<.*?>>)/\?/g;
- my ( $sth, $errors ) = execute_query( $sql, $offset, $limit, \@sql_params );
+ my ( $sth, $errors ) = execute_query( $sql, $offset, $limit, \@sql_params, $report_id );
if ($sth) {
my $lines;
if ($report_annotation) {
$json_text = encode_json($lines);
if ($cache_active) {
- $cache->set_in_cache( $cache_key, $json_text, $report_rec->{cache_expiry} );
+ $cache->set_in_cache( $cache_key, $json_text, { expiry => $report_rec->{cache_expiry} } );
}
}
else {