]> git.koha-community.org Git - koha.git/commit
Bug 34051: Cache empty hashref for non-existent authorised values
authorDavid Cook <dcook@prosentient.com.au>
Mon, 19 Jun 2023 01:26:35 +0000 (01:26 +0000)
committerPedro Amorim <pedro.amorim@ptfs-europe.com>
Tue, 18 Jul 2023 10:31:49 +0000 (10:31 +0000)
commit874bf73b7cfa2517917b66687780fa7965cab1d9
treee3bea0c0e9839e8615e42367371eeb92ee123e86
parenta1c0c3ec6bbab3a3a379fde618387dcc4a41e2ea
Bug 34051: Cache empty hashref for non-existent authorised values

When fetching authorised value descriptions, we need to handle
scenarios where a value doesn't exist in the cache and doesn't
exist in the database. In this situation, we return an empty
hashref, and this patch makes us cache this empty hashref.

This is important because otherwise the function
Koha::AuthorisedValues->get_description_by_koha_field will
do a database call every time it encounters the same value that
doesn't exist in the authorised values table.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3a0aaec102b05fc5a5b0573e1888facd22a731f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 25230f4cf91a591dcfdf5bcac00e1d085b1c4b41)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Koha/AuthorisedValues.pm