@@ -, +, @@ in svc/report and opac counterpart opac:report:id:602018 opac:report:id:60:2018 --- opac/svc/report | 4 ++-- svc/report | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/opac/svc/report +++ a/opac/svc/report @@ -41,7 +41,7 @@ my $report_rec = $report_recs->next(); die "Sorry this report is not public\n" unless $report_rec->public; -my @sql_params = $query->param('sql_params'); +my @sql_params = $query->multi_param('sql_params'); my $cache = Koha::Caches->get_instance(); my $cache_active = $cache->is_cache_active; @@ -49,7 +49,7 @@ my ($cache_key, $json_text); if ($cache_active) { $cache_key = "opac:report:" - . ( $report_name ? "name:$report_name" : "id:$report_id" ) + . ( $report_name ? "name:$report_name:" : "id:$report_id:" ) . join( '-', @sql_params ); $json_text = $cache->get_from_cache($cache_key); } --- a/svc/report +++ a/svc/report @@ -38,7 +38,7 @@ my $report_recs = Koha::Reports->search( $report_name ? { 'report_name' => $repo if (!$report_recs || $report_recs->count == 0 ) { die "There is no such report.\n"; } my $report_rec = $report_recs->next(); -my @sql_params = $query->param('sql_params'); +my @sql_params = $query->multi_param('sql_params'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -54,7 +54,7 @@ my $cache = Koha::Caches->get_instance(); my $cache_active = $cache->is_cache_active; my ($cache_key, $json_text); if ($cache_active) { - $cache_key = "intranet:report:".($report_name ? "report_name:$report_name" : "id:$report_id") + $cache_key = "intranet:report:".($report_name ? "report_name:$report_name:" : "id:$report_id:") . join( '-', @sql_params ); $json_text = $cache->get_from_cache($cache_key); } --