The cache is cleared for the default framework, but the mapping can be read from another framework
Coming from bug 30909 comment 14.
Hum, I am not sure what is the best here. The original problem is that the koha-MARC mapping is not updated when adding/editing items. So this may be a regression coming from bug 27526, where we are now using the marc subfield structure (mss) from the biblio to retrieve the mapping (kohafield). And before we were calling C4::Biblio::GetMarcFromKohaField. Either 1. we consider that the kohafield can be retrieved from any mss in cache, or 2. we force the fetch to be done using GetMarcFromKohaField. 2. is easier to implement, 1. is preventing us from hitting the same problem in the future (and certainly better for perfs but nothing bad as GetMarcFromKohaField is cached). What's your call?
For 1. we need a separate cache for biblio frameworks that we could fully cleared when they are modified.
(In reply to Jonathan Druart from comment #0) > The cache is cleared for the default framework, but the mapping can be read > from another framework I'm pretty sure I used the default framework when noticing this bug for the first time. The cache invalidation problem occurred only when I deleted a mapping, I didn't notice it happening when changing the value of a mapping. I'll try to circle back to this bug report later to confirm / and see if I have any ideas on how to fix this issue.
(In reply to Joonas Kylmälä from comment #4) > (In reply to Jonathan Druart from comment #0) > > The cache is cleared for the default framework, but the mapping can be read > > from another framework > > I'm pretty sure I used the default framework when noticing this bug for the > first time. The cache invalidation problem occurred only when I deleted a > mapping, I didn't notice it happening when changing the value of a mapping. > I'll try to circle back to this bug report later to confirm / and see if I > have any ideas on how to fix this issue. We only use the default framework now for the mappings - or more, it's authoritative. So that would ont be an issue, but Joonas sounds like there might still be some other issues.