From: Galen Charlton Date: Wed, 17 Jun 2009 21:27:34 +0000 (-0500) Subject: use Memoize to cache results of GetAuthorisedValues X-Git-Tag: n_acq_a_porter~26^2~44 X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=5dd3a9c157ef091729dbea78db9ace8c21b63338 use Memoize to cache results of GetAuthorisedValues Thanks to Frédéric Demians for the original impetus to improve this function and for doing profiling. Note that Memoize is a core module since at least 5.8.0. Signed-off-by: Galen Charlton --- diff --git a/C4/Koha.pm b/C4/Koha.pm index b4ce84b83d..05e3074e72 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -22,6 +22,7 @@ use strict; use C4::Context; use C4::Output; use URI::Split qw(uri_split); +use Memoize; use vars qw($VERSION @ISA @EXPORT $DEBUG); @@ -62,6 +63,9 @@ BEGIN { $DEBUG = 0; } +# expensive functions +memoize('GetAuthorisedValues'); + =head1 NAME C4::Koha - Perl Module containing convenience functions for Koha scripts