X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ee4b527080ea2db5f07f0b8c6d406de47b74e81b..96717bed8061efaa4d626d5da34122ef0cb3e8d2:/SL/DB/Chart.pm diff --git a/SL/DB/Chart.pm b/SL/DB/Chart.pm index 718d42251..db8a3b945 100644 --- a/SL/DB/Chart.pm +++ b/SL/DB/Chart.pm @@ -16,6 +16,12 @@ __PACKAGE__->meta->initialize; sub get_active_taxkey { my ($self, $date) = @_; $date ||= DateTime->today_local; + + my $cache = $::request->{cache}{chart}{$date}; + if ($cache->{$self->id}) { + return $cache->{$self->id}; + } + require SL::DB::TaxKey; return SL::DB::Manager::TaxKey->get_all(query => [ and => [ chart_id => $self->id, startdate => { le => $date } ] ],