X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ff338f61ac95e8e276e61b71d6dcbf73680300aa..55872fd8048745f35fb1f5f48aae2bda20e324ca:/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 } ] ],