From 0a09cb7d09e3dabd983d137dd7f86e08525a75fa Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sat, 18 Jun 2016 15:21:28 +0100 Subject: [PATCH] Bug 16770: Remove wrong caching of 3 subroutines in C4::Lancuages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ooking at this code, you might think these subroutines are cached, but actually they are not. The eval surrounding the code hides a bug, if you remove it, you will get: Invalid memcached argument (expected a hash) Test plan: Do not apply this patch and confirm that the code does not work Signed-off-by: Jacek Ablewicz Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall (cherry picked from commit 44fb6e72254391d38b7a66fa395bb9874a6d716c) Signed-off-by: Frédéric Demians --- C4/Languages.pm | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/C4/Languages.pm b/C4/Languages.pm index 38e87b6ec6..5e4dabd14d 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -29,17 +29,6 @@ use C4::Context; use Koha::Cache::Memory::Lite; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); -eval { - if (C4::Context->ismemcached) { - require Memoize::Memcached; - import Memoize::Memcached qw(memoize_memcached); - - memoize_memcached('getTranslatedLanguages', memcached => C4::Context->memcached); - memoize_memcached('getFrameworkLanguages' , memcached => C4::Context->memcached); - memoize_memcached('getAllLanguages', memcached => C4::Context->memcached); - } -}; - BEGIN { require Exporter; @ISA = qw(Exporter); -- 2.39.5