Bug 29190

Summary: Additional contents: Cache local pages
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: OPACAssignee: Bugs List <koha-bugs>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, jonathan.druart, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15326
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 29144, 31385    
Bug Blocks:    

Description Marcel de Rooy 2021-10-07 09:03:34 UTC
In short:

It would be handy if you could refer to a news page (additional contents) by title (combined with language) instead of only an identifier.

And wouldnt it be nice to cache these pages that are (probably frequently) accessed via opac-main?
Comment 1 Marcel de Rooy 2021-10-07 11:13:35 UTC
Title or code ?
Comment 2 Jonathan Druart 2021-10-07 11:39:07 UTC
Yes, that should be 'code' and 'lang'.
Comment 3 Marcel de Rooy 2022-08-18 11:42:40 UTC
In the meantime 15326 was pushed with CMS pages via additional content.
And we use code to look for CMS pages under 31385.

What remains here, is caching selected pages.
Comment 4 Marcel de Rooy 2022-08-18 13:06:34 UTC
What I could do, is:
Add some get_from_cache and set_in_cache stuff around the code in AdditionalContents.pm for search, search_for_display, find_best_match.

But it would not be very generic in that part of code. And at the same time it is quite tricky to cache searches if they are specific enough. Especially the part of clearing the cache again when some new records are added seems not trivial. So a bit dangerous?
Comment 5 Marcel de Rooy 2023-01-20 07:43:34 UTC
Changed title, limiting scope. No feedback.
Comment 6 Marcel de Rooy 2023-06-27 14:21:09 UTC
Closing