From 47946c99ac3fa8f743694931551e70ffcf0b448d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 17 Aug 2021 11:55:21 -0300 Subject: [PATCH] Bug 28871: (follow-up) Remove caching This patch removes the use of set_cache, as it gets ineffective with this patchset. To test: 1. Without any patches applied do: $ docker exec -ti koha_db_1 bash m$ mysql -ppassword > SET GLOBAL general_log=1; > SET GLOBAL general_log_file='mariadb.log'; > \q m$ tail -f /var/lib/mysql/mariadb.log 2. On a separate terminal run: $ kshell k$ prove t/db_dependent/Koha/Objects.t => Notice that before the DELETE tests are run, there are some queries about borrowers and 0 = 1 3. Apply this patches 4. Repeat 2 => Notice there's an extra query This is only to highlight the side-effect of this change. Signed-off-by: Tomas Cohen Arazi --- Koha/Objects.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/Koha/Objects.pm b/Koha/Objects.pm index 1cd2ec0907..5baa578f25 100644 --- a/Koha/Objects.pm +++ b/Koha/Objects.pm @@ -380,8 +380,6 @@ sub empty { class => $self ) unless ref $self; - $self->_resultset()->set_cache([]); - return $self->search(\'0 = 1'); } -- 2.30.2