Lines 29-34
use Koha::SMTP::Servers;
Link Here
|
29 |
|
29 |
|
30 |
use base qw(Koha::Object); |
30 |
use base qw(Koha::Object); |
31 |
|
31 |
|
|
|
32 |
my $cache = Koha::Caches->get_instance(); |
33 |
|
32 |
=head1 NAME |
34 |
=head1 NAME |
33 |
|
35 |
|
34 |
Koha::Library - Koha Library Object class |
36 |
Koha::Library - Koha Library Object class |
Lines 59-71
sub store {
Link Here
|
59 |
$self = $self->SUPER::store; |
61 |
$self = $self->SUPER::store; |
60 |
|
62 |
|
61 |
if ($flush) { |
63 |
if ($flush) { |
62 |
my $cache = Koha::Caches->get_instance(); |
|
|
63 |
$cache->clear_from_cache('libraries:name'); |
64 |
$cache->clear_from_cache('libraries:name'); |
64 |
} |
65 |
} |
65 |
|
66 |
|
66 |
return $self; |
67 |
return $self; |
67 |
} |
68 |
} |
68 |
|
69 |
|
|
|
70 |
=head2 delete |
71 |
|
72 |
Library specific C<delete> to clear relevant caches on delete. |
73 |
|
74 |
=cut |
75 |
|
76 |
sub delete { |
77 |
my $self = shift @_; |
78 |
$cache->clear_from_cache('libraries:name'); |
79 |
$self->SUPER::delete(@_); |
80 |
} |
81 |
|
69 |
=head3 stockrotationstages |
82 |
=head3 stockrotationstages |
70 |
|
83 |
|
71 |
my $stages = Koha::Library->stockrotationstages; |
84 |
my $stages = Koha::Library->stockrotationstages; |