https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431

Kyle M Hall <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #51380|0                           |1
        is obsolete|                            |

--- Comment #5 from Kyle M Hall <[email protected]> ---
Created attachment 52813
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52813&action=edit
Bug 16431: Use Koha::Cache to cache marc subfield structure

The marc subfield structure is currently cached using a global variable
of C4::Context. The infos are retrieved every time a new context is
created.
This patch suggests to use Koha::Cache instead.

To achieve this goal, a new subroutine is created
C4::Biblio::GetMarcSubfieldStructure, it will be called from code which
needs to get the marc subfield structure. GetMarcFromKohaField,
GetMarcSubfieldStructureFromKohaField, TransformKohaToMarc and
_get_inverted_marc_field_map are modified accordingly and the cache is cleared
when the table is updated (from the 3 pl scripts modified by this patch).

The caching done in C4::Context (marcfromkohafield) is removed.

Test plan:
Play with the marc subfield structure (in the administration module),
then add and edit records and make sure everything went fine.

Signed-off-by: Tomas Cohen Arazi <[email protected]>
Everything works as expected on my functional tests. I'm really happy to see
the
patch introduces relevant tests for previously untested functions.

Signed-off-by: Kyle M Hall <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to