<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Look at XSLT_Handler ?</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Van:</b> koha-devel-bounces@lists.koha-community.org <koha-devel-bounces@lists.koha-community.org> namens Paul Poulain <paul.poulain@biblibre.com><br>
<b>Verzonden:</b> vrijdag 21 december 2018 17:01<br>
<b>CC:</b> koha-devel<br>
<b>Onderwerp:</b> Re: [Koha-devel] Cache::Memory must be removed (21955)</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Great, thanks !<br>
<br>
An idea: couldn't we also cache the xslt display of biblios, as it <br>
requires quite a long time to be done, and it's a data that change rarely ?<br>
<br>
Le 21/12/2018 à 16:51, Jonathan Druart a écrit :<br>
> I have stolen this existing page and wrote some info about our cache mechanism:<br>
> <a href="https://wiki.koha-community.org/wiki/Cache_handling_in_Koha">https://wiki.koha-community.org/wiki/Cache_handling_in_Koha</a><br>
><br>
> Feel free to ask if you need more info or if something is still not<br>
> clear enough.<br>
><br>
> Cheers,<br>
> Jonathan<br>
><br>
> Le mer. 19 déc. 2018 à 05:33, Paul Poulain <paul.poulain@biblibre.com> a écrit :<br>
>> Hi Jonathan,<br>
>><br>
>> I'd be very happy if you could wrote something on the wiki, I'm a little<br>
>> bit confused by all those cache...<br>
>><br>
>> Le 07/12/2018 à 16:36, Jonathan Druart a écrit :<br>
>>> I talked with Ere on IRC, but prefer to let a note here as well.<br>
>>><br>
>>> Enabling Cache::Memory if Plack is not running will not help as we<br>
>>> have the L1 (in memory) cache, which is used in any cases (and flushed<br>
>>> under Plack before a request is made).<br>
>>><br>
>>> I do not know how is our caching system understood by the team. I can<br>
>>> try and write something on the wiki if it can help. Hint: there is no<br>
>>> black magic :)<br>
>>><br>
>>> Cheers,<br>
>>> Jonathan<br>
>>><br>
>>> Le ven. 7 déc. 2018 à 04:55, Ere Maijala <ere.maijala@helsinki.fi> a écrit :<br>
>>>> I'm a bit hesitant on this. I understand running without a cache makes<br>
>>>> things like tests easier, but Cache::Memory is actually a pretty useful<br>
>>>> fallback. There's a lot of code in Koha that does redundant fetches of<br>
>>>> e.g. framework data, and without caching I'm afraid it will slow down<br>
>>>> significantly. Cache::Memory is very handy when developing stuff to<br>
>>>> speed up execution of e.g. batch utilities when you don't want to mess<br>
>>>> with constantly flushing Memcached.<br>
>>>><br>
>>>> I would like to propose another approach for considerarion: disable<br>
>>>> Cache::Memory only if running under Plack.<br>
>>>><br>
>>>> --Ere<br>
>>>><br>
>>>> David Cook kirjoitti 7.12.2018 klo 1.52:<br>
>>>>> I’ve noticed some caching issues but haven’t had time to investigate too<br>
>>>>> deeply. I wonder if this relates to what I’ve encountered.<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> In any case, +1!<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> David Cook<br>
>>>>><br>
>>>>> Systems Librarian<br>
>>>>><br>
>>>>> Prosentient Systems<br>
>>>>><br>
>>>>> 72/330 Wattle St<br>
>>>>><br>
>>>>> Ultimo, NSW 2007<br>
>>>>><br>
>>>>> Australia<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> Office: 02 9212 0899<br>
>>>>><br>
>>>>> Direct: 02 8005 0595<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> *From:*koha-devel-bounces@lists.koha-community.org<br>
>>>>> [<a href="mailto:koha-devel-bounces@lists.koha-community.org">mailto:koha-devel-bounces@lists.koha-community.org</a>] *On Behalf Of<br>
>>>>> *Tomas Cohen Arazi<br>
>>>>> *Sent:* Friday, 7 December 2018 2:44 AM<br>
>>>>> *To:* Jonathan Druart <jonathan.druart@bugs.koha-community.org><br>
>>>>> *Cc:* koha-devel <koha-devel@lists.koha-community.org><br>
>>>>> *Subject:* Re: [Koha-devel] Cache::Memory must be removed (21955)<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> Get rid of it!<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> +1<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> El mié., 5 dic. 2018 a las 16:20, Jonathan Druart<br>
>>>>> (<jonathan.druart@bugs.koha-community.org<br>
>>>>> <<a href="mailto:jonathan.druart@bugs.koha-community.org">mailto:jonathan.druart@bugs.koha-community.org</a>>>) escribió:<br>
>>>>><br>
>>>>>       Hi devs,<br>
>>>>><br>
>>>>>       I am still recovering from my holidays and I think I caught a quite<br>
>>>>>       big fish.<br>
>>>>><br>
>>>>>       After an interesting track game I will explain why I am suggesting to<br>
>>>>>       remove Cache::Memory that is currently used as fallback for the L2<br>
>>>>>       cache.<br>
>>>>><br>
>>>>>       What I tried to fix:<br>
>>>>>       Jenkins is complaining about selenium tests (regressions.t) failing on<br>
>>>>>       18.05, it is a succession of events and bugs that were not linked at<br>
>>>>>       first glance.<br>
>>>>><br>
>>>>>       Here are the different steps I went though:<br>
>>>>>       - On bug 21426 we noticed that USE_MEMCACHED was not taken into<br>
>>>>>       account. If set to "no" the default memcached config was defined in<br>
>>>>>       the koha-config.xml file anyway<br>
>>>>>       - A new regression selenium test was added on bug 21777 to catch the<br>
>>>>>       presence of an audio alert on the circulation page<br>
>>>>>       - Investigating the failing tests I noticed that koha-testing-docker<br>
>>>>>       was not setting the memcached config on the 18.05 branches (I guess<br>
>>>>>       the image has not been rebuilt yet)<br>
>>>>>       search_utf8.t output "Warning: script running in daemon mode, without<br>
>>>>>       recommended caching system (memcached)."<br>
>>>>>       - I also find that [% Koha.Preference('AudioAlerts') %] did not return<br>
>>>>>       the value set by the tests, but the value that the DB has before the<br>
>>>>>       tests were launched<br>
>>>>>       => It is a cache issue!<br>
>>>>>       - ...but only when memcached is not set...<br>
>>>>>       - Reading Koha::Cache->new we can notice that Cache::Memory is used<br>
>>>>>       for the L2 cache when memcached is not defined in the config<br>
>>>>><br>
>>>>>       And so we have the problem: If a value is set in the cache by a Plack<br>
>>>>>       worker, it will not be available from another one, as the L2 cache is<br>
>>>>>       not shared (!)<br>
>>>>><br>
>>>>>       To recreate easily the problem you can:<br>
>>>>>       - remove the memcached config<br>
>>>>>       - edit intranet-bottom.inc and add<br>
>>>>>       ===[% Koha.Preference('AudioAlerts') %]===<br>
>>>>>       - restart plack<br>
>>>>>       - Modify the value of AudioAlerts (using the UI)<br>
>>>>>       - Reload the page (reload several times if the value is still correct,<br>
>>>>>       it will depend on which worker will serve the request)<br>
>>>>><br>
>>>>>       Solution:<br>
>>>>>       I am considering removing Cache::Memory unless somebody else has a<br>
>>>>>       better idea<br>
>>>>>       Bug 21955 - Cache::Memory should not be used as L2 cache<br>
>>>>><br>
>>>>>       Note that it should not affect a lot of people as everybody is<br>
>>>>>       supposed to have memcached configured and working correctly!<br>
>>>>><br>
>>>>>       Cheers,<br>
>>>>>       Jonathan<br>
>>>>>       _______________________________________________<br>
>>>>>       Koha-devel mailing list<br>
>>>>>       Koha-devel@lists.koha-community.org<br>
>>>>>       <<a href="mailto:Koha-devel@lists.koha-community.org">mailto:Koha-devel@lists.koha-community.org</a>><br>
>>>>>       <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
>>>>>       website : <a href="http://www.koha-community.org/">http://www.koha-community.org/</a><br>
>>>>>       git : <a href="http://git.koha-community.org/">http://git.koha-community.org/</a><br>
>>>>>       bugs : <a href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>><br>
>>>>> Tomás Cohen Arazi<br>
>>>>><br>
>>>>> Theke Solutions (<a href=""></a>http://theke.io <<a href="http://theke.io/">http://theke.io/</a>>)<br>
>>>>> ✆+54 9351 3513384<br>
>>>>> GPG: B2F3C15F<br>
>>>>><br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> Koha-devel mailing list<br>
>>>>> Koha-devel@lists.koha-community.org<br>
>>>>> <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
>>>>> website : <a href="http://www.koha-community.org/">http://www.koha-community.org/</a><br>
>>>>> git : <a href="http://git.koha-community.org/">http://git.koha-community.org/</a><br>
>>>>> bugs : <a href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a><br>
>>>>><br>
>>>> --<br>
>>>> Ere Maijala<br>
>>>> Kansalliskirjasto / The National Library of Finland<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Koha-devel mailing list<br>
>>>> Koha-devel@lists.koha-community.org<br>
>>>> <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
>>>> website : <a href="http://www.koha-community.org/">http://www.koha-community.org/</a><br>
>>>> git : <a href="http://git.koha-community.org/">http://git.koha-community.org/</a><br>
>>>> bugs : <a href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a><br>
>>> _______________________________________________<br>
>>> Koha-devel mailing list<br>
>>> Koha-devel@lists.koha-community.org<br>
>>> <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
>>> website : <a href="http://www.koha-community.org/">http://www.koha-community.org/</a><br>
>>> git : <a href="http://git.koha-community.org/">http://git.koha-community.org/</a><br>
>>> bugs : <a href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a><br>
>> --<br>
>> Paul Poulain, Associé-gérant / co-owner<br>
>> BibLibre, Services en logiciels libres pour les bibliothèques<br>
>> BibLibre, Open Source software and services for libraries<br>
>><br>
>> _______________________________________________<br>
>> Koha-devel mailing list<br>
>> Koha-devel@lists.koha-community.org<br>
>> <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
>> website : <a href="http://www.koha-community.org/">http://www.koha-community.org/</a><br>
>> git : <a href="http://git.koha-community.org/">http://git.koha-community.org/</a><br>
>> bugs : <a href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a><br>
<br>
-- <br>
Paul Poulain, Associé-gérant / co-owner<br>
BibLibre, Services en logiciels libres pour les bibliothèques<br>
BibLibre, Open Source software and services for libraries<br>
<br>
_______________________________________________<br>
Koha-devel mailing list<br>
Koha-devel@lists.koha-community.org<br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></div>
</span></font></div>
</div>
</body>
</html>