View | Details | Raw Unified | Return to bug 29623
Collapse All | Expand All

(-)a/Koha/Cache/Memory/Lite.pm (+5 lines)
Lines 64-69 sub clear_from_cache { Link Here
64
    delete $L1_cache{$key};
64
    delete $L1_cache{$key};
65
}
65
}
66
66
67
sub all_keys {
68
    my ( $self ) = @_;
69
    return keys %L1_cache;
70
}
71
67
sub flush {
72
sub flush {
68
    my ( $self ) = @_;
73
    my ( $self ) = @_;
69
    %L1_cache = ();
74
    %L1_cache = ();
(-)a/Koha/CirculationRules.pm (-6 / +3 lines)
Lines 377-386 sub set_rule { Link Here
377
    }
377
    }
378
378
379
    my $memory_cache = Koha::Cache::Memory::Lite->get_instance;
379
    my $memory_cache = Koha::Cache::Memory::Lite->get_instance;
380
    my $cache_key = sprintf "CircRules:%s:%s:%s:%s", $rule_name // q{},
380
    for my $k ( $memory_cache->all_keys ) {
381
      $categorycode // q{}, $branchcode // q{}, $itemtype // q{};
381
        $memory_cache->clear_from_cache($k) if $k =~ m{^CircRules:};
382
382
    }
383
    Koha::Cache::Memory::Lite->flush();
384
383
385
    return $rule;
384
    return $rule;
386
}
385
}
Lines 410-416 sub set_rules { Link Here
410
        push( @$rule_objects, $rule_object );
409
        push( @$rule_objects, $rule_object );
411
    }
410
    }
412
411
413
    Koha::Cache::Memory::Lite->flush();
414
    return $rule_objects;
412
    return $rule_objects;
415
}
413
}
416
414
417
- 

Return to bug 29623