 +++ b/debian/templates/plack.psgi
 @@ -66,6 +66,45 @@ my $apiv1  = builder {
  };
+
  builder {
 +    enable sub {
 +        my $app = shift;

009b-bug17941-purefunctions.patch
This patch adds Koha::Util::PureFunctions
PureFunctions adds a HashMap function attribute that will work as a Cached Index for
stable, idempotent Getter functions that will greatly improve the speed of Koha in
places where same function is called many times and produces many Mysql requests
diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 6d0c9bb..6569414 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -50,9 +50,9 @@ use vars qw(@ISA @EXPORT);
 use vars qw($debug $cgi_debug);
 BEGIN {
-
+    require Koha::Util::PureFunctions;
     require Exporter;
-    @ISA = qw( Exporter );
+    @ISA = qw( Koha::Util::PureFunctions Exporter );
     # to add biblios
     # EXPORTED FUNCTIONS.
@@ -761,7 +761,7 @@ the first one is considered.
 =cut
-sub GetBiblioData {
+sub GetBiblioData : PureFunction {
     my ($bibnum) = @_;
     my $dbh = C4::Context->dbh;
@@ -860,7 +860,7 @@ database.
 =cut
 #'
-sub GetBiblioFromItemNumber {
+sub GetBiblioFromItemNumber : PureFunction {

+    require Koha::Util::PureFunctions;
+    require Exporter;
+    @ISA = qw( Koha::Util::PureFunctions Exporter );

     # function exports
     @EXPORT = qw(
@@ -154,7 +154,7 @@ names to values.  If C<$serial> is true, include serial publication data.

 =cut

-sub GetItem {
+sub GetItem : PureFunction {
     my ($itemnumber,$barcode, $serial) = @_;
     my $dbh = C4::Context->dbh;

@@ -1302,7 +1302,7 @@ If this is set, it is set to C<One Order>.

 =cut

-sub GetItemsInfo {
+sub GetItemsInfo : PureFunction {
     my ( $biblionumber ) = @_;
