https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43269
--- Comment #6 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 203464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203464&action=edit Bug 43269: Define cache keys as constants in singular classes Moves cache key definitions from string literals scattered across read/write codepaths into constants on the singular class: - Koha::Library::CACHE_KEY_NAMES (libraries:name) - Koha::ClassSource::CACHE_KEY_DESCRIPTIONS (cn_sources:description) - Koha::AuthorisedValue::CACHE_KEY_PREFIX (AV_descriptions:) Both the invalidation code (store/delete in singular class) and the lookup code (name_for/description_for in plural class) now reference the same constant. This prevents cache key drift and makes the relationship between reader and writer explicit and grep-friendly. Test plan: 1. Apply patches 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Libraries.t t/db_dependent/Koha/ClassSources.t t/db_dependent/Koha/AuthorisedValues.t t/db_dependent/Biblio.t => SUCCESS: Tests pass! 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
