Skip to content

Commit

Permalink
Cache removal followup
Browse files Browse the repository at this point in the history
  • Loading branch information
kidclamp committed Nov 28, 2016
1 parent 6e03276 commit 4e753c8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use JavaScript::Minifier qw(minify);


## Here we set our plugin version
our $VERSiION = "{VERSION}";
our $VERSION = "{VERSION}";

## Here is our metadata, some keys are required, some are optional
our $metadata = {
Expand Down Expand Up @@ -222,16 +222,16 @@ sub get_report {

my @sql_params = $sql_params ? @$sql_params : ();

my $cache;# = Koha::Caches->get_instance();
my $cache_active;# = $cache->is_cache_active;
my ( $cache_key, $json_text );
if ($cache_active) {
$cache_key =
"opac:report:"
. ( $report_name ? "name:$report_name" : "id:$report_id" )
. join( '-', @sql_params );
$json_text = $cache->get_from_cache($cache_key);
}
my $cache;# = Koha::Caches->get_instance();
my $cache_active;# = $cache->is_cache_active;
my ( $cache_key, $json_text );
# if ($cache_active) {
# $cache_key =
# "opac:report:"
# . ( $report_name ? "name:$report_name" : "id:$report_id" )
# . join( '-', @sql_params );
# $json_text = $cache->get_from_cache($cache_key);
# }

unless ($json_text) {
my $offset = 0;
Expand All @@ -249,10 +249,10 @@ sub get_report {
map { $_->{isbn} = GetNormalizedISBN( $_->{isbn} ) } @$lines;
$json_text = to_json($lines);

if ($cache_active) {
$cache->set_in_cache( $cache_key, $json_text,
{ expiry => $report_rec->{cache_expiry} } );
}
# if ($cache_active) {
# $cache->set_in_cache( $cache_key, $json_text,
# { expiry => $report_rec->{cache_expiry} } );
# }
}
else {
$json_text = to_json($errors);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "koha-coverflow-plugin",
"version": "2.3",
"version": "2.3.1",
"description": "Koha CoverFlow Plugin",
"main": "index.js",
"dependencies": {
Expand Down

0 comments on commit 4e753c8

Please sign in to comment.