Summary: | The ViewPolicy filter should cache the MARC framework structure | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED WORKSFORME | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 24458 | ||
Bug Blocks: | |||
Attachments: |
Bug 25457: Regression tests
Bug 25457: Make ViewPolicy cache MARC frameworks Bug 25457: Regression tests Bug 25457: Make ViewPolicy cache MARC frameworks |
Description
Tomás Cohen Arazi (tcohen)
2020-05-11 13:30:38 UTC
Created attachment 104712 [details] [review] Bug 25457: Regression tests This patch implements tests on the ViewPolicy RecordProcessor filter, to assess it caches the calculated MARC subfield structure between calls. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 104713 [details] [review] Bug 25457: Make ViewPolicy cache MARC frameworks This patch implements an implicit cache of the calculated MARC subfield structures on each use of the filter. Moreover, if different frameworks are set between calls (using $processor->options) all of them are cached. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t => FAIL: The ViewPolicy filter doesn't cache anything 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 104836 [details] [review] Bug 25457: Regression tests This patch implements tests on the ViewPolicy RecordProcessor filter, to assess it caches the calculated MARC subfield structure between calls. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 104837 [details] [review] Bug 25457: Make ViewPolicy cache MARC frameworks This patch implements an implicit cache of the calculated MARC subfield structures on each use of the filter. Moreover, if different frameworks are set between calls (using $processor->options) all of them are cached. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t => FAIL: The ViewPolicy filter doesn't cache anything 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> I don't see how it could be useful, you are calling GetMarcStructure that is doing exactly that. (In reply to Jonathan Druart from comment #5) > I don't see how it could be useful, you are calling GetMarcStructure that is > doing exactly that. Is it storing the structure in L1? yes of course. |