<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>A new request with request id 18665 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is : <br><br>Title : Koha-devel Digest, Vol 186, Issue 3<br>Category : <br>Description : <div>Send Koha-devel mailing list submissions to<br>    koha-devel@lists.koha-community.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>    https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>or, via email, send a message with subject or body 'help' to<br>    koha-devel-request@lists.koha-community.org<br><br>You can reach the person managing the list at<br>    koha-devel-owner@lists.koha-community.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Koha-devel digest..."<br><br><br>Today's Topics:<br><br>   1. Re: Why is config ($KOHA_CONF) stored in memcached ?<br>      (Julian Maurice)<br>   2. Re: Why is config ($KOHA_CONF) stored in memcached ?<br>      (dcook@prosentient.com.au)<br>   3. HTTP/HTTPS cheme in Base Path in API documentation<br>      (dcook@prosentient.com.au)<br>   4. Re: Why is config ($KOHA_CONF) stored in memcached ?<br>      (Julian Maurice)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sun, 2 May 2021 14:52:24 +0200<br>From: Julian Maurice <julian.maurice@biblibre.com><br>To: Tomas Cohen Arazi <tomascohen@gmail.com><br>Cc: koha-devel <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] Why is config ($KOHA_CONF) stored in<br>    memcached ?<br>Message-ID: <7c3c218b-e2d5-d03b-3095-ff297ec71e7d@biblibre.com><br>Content-Type: text/plain; charset=utf-8; format=flowed<br><br>Patch is ready to be tested at <br>https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28276 ;)<br><br>Le 01/05/2021 à 14:53, Tomas Cohen Arazi a écrit :<br>> I vote for fixing it so the file is only hit the first time.<br>> <br>> El vie, 30 abr 2021 a las 14:19, Julian Maurice <br>> (<julian.maurice@biblibre.com <mailto:julian.maurice@biblibre.com>>) <br>> escribió:<br>> <br>>     Hi all,<br>> <br>>     Maybe it's a dumb question, but I don't understand why the config is<br>>     stored in memcached as:<br>>     - memcached server address is in this config, so we need to read<br>>     $KOHA_CONF file first in order to connect to memcached server<br>>     - config is kept in memory forever ($C4::Context::context), so we<br>>     shouldn't need the cache once starman has started.<br>> <br>>     If you add a warning in Koha::Config::read_from_file, you'll see that<br>>     the file is read 3 times per worker, even when the config already exist<br>>     in cache (it's read 4 times when the cache is empty).<br>>     It's read each time we call Koha::Cache->new (+ in C4::Context->new if<br>>     the cache is empty)<br>> <br>>     Shouldn't we read the file only in C4::Context->new (without using<br>>     cache), and make Koha::Cache use C4::Context->config instead ?<br>> <br>>     -- <br>>     Julian Maurice<br>>     BibLibre<br>>     _______________________________________________<br>>     Koha-devel mailing list<br>>     Koha-devel@lists.koha-community.org<br>>     <mailto:Koha-devel@lists.koha-community.org><br>>     https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>>     <https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel><br>>     website : https://www.koha-community.org/<br>>     <https://www.koha-community.org/><br>>     git : https://git.koha-community.org/ <https://git.koha-community.org/><br>>     bugs : https://bugs.koha-community.org/<br>>     <https://bugs.koha-community.org/><br>> <br>> <br>> <br>> -- <br>> Tomás Cohen Arazi<br>> Theke Solutions (http://theke.io <http://theke.io/>)<br>> ✆ +54 9351 3513384<br>> GPG: B2F3C15F<br><br>-- <br>Julian Maurice<br>BibLibre<br><br><br>------------------------------<br><br>Message: 2<br>Date: Mon, 3 May 2021 09:28:45 +1000<br>From: <dcook@prosentient.com.au><br>To: "'Tomas Cohen Arazi'" <tomascohen@gmail.com>, "'Julian Maurice'"<br>    <julian.maurice@biblibre.com><br>Cc: "'koha-devel'" <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] Why is config ($KOHA_CONF) stored in<br>    memcached ?<br>Message-ID: <021501d73faa$e53fc1b0$afbf4510$@prosentient.com.au><br>Content-Type: text/plain; charset="utf-8"<br><br>Sounds good to me.<br><br> <br><br>I don’t recall how long the Koha conf has been stored in Memcached, but it would have benefited CGI Koha since every HTTP request would’ve done a disk read. But I think we’ve pretty much moved on from CGI now, so +1 to only reading koha-conf.xml once at startup.<br><br> <br><br>This change should also make it easier to make changes to Koha. It drives me a little bit crazy that I have to manually clear Memcached every time I make a change to koha-conf.xml… <br><br> <br><br>David Cook<br><br>Software Engineer<br><br>Prosentient Systems<br><br>Suite 7.03<br><br>6a Glen St<br><br>Milsons Point NSW 2061<br><br>Australia<br><br> <br><br>Office: 02 9212 0899<br><br>Online: 02 8005 0595<br><br> <br><br>From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Tomas Cohen Arazi<br>Sent: Saturday, 1 May 2021 10:53 PM<br>To: Julian Maurice <julian.maurice@biblibre.com><br>Cc: koha-devel <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] Why is config ($KOHA_CONF) stored in memcached ?<br><br> <br><br>I vote for fixing it so the file is only hit the first time.<br><br> <br><br>El vie, 30 abr 2021 a las 14:19, Julian Maurice (<julian.maurice@biblibre.com <mailto:julian.maurice@biblibre.com> >) escribió:<br><br>Hi all,<br><br>Maybe it's a dumb question, but I don't understand why the config is <br>stored in memcached as:<br>- memcached server address is in this config, so we need to read <br>$KOHA_CONF file first in order to connect to memcached server<br>- config is kept in memory forever ($C4::Context::context), so we <br>shouldn't need the cache once starman has started.<br><br>If you add a warning in Koha::Config::read_from_file, you'll see that <br>the file is read 3 times per worker, even when the config already exist <br>in cache (it's read 4 times when the cache is empty).<br>It's read each time we call Koha::Cache->new (+ in C4::Context->new if <br>the cache is empty)<br><br>Shouldn't we read the file only in C4::Context->new (without using <br>cache), and make Koha::Cache use C4::Context->config instead ?<br><br>-- <br>Julian Maurice<br>BibLibre<br>_______________________________________________<br>Koha-devel mailing list<br>Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> <br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>website : https://www.koha-community.org/<br>git : https://git.koha-community.org/<br>bugs : https://bugs.koha-community.org/<br><br><br><br><br> <br><br>-- <br><br>Tomás Cohen Arazi<br><br>Theke Solutions (http://theke.io <http://theke.io/> )<br>✆ +54 9351 3513384<br>GPG: B2F3C15F<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210503/49b2777c/attachment-0001.htm><br><br>------------------------------<br><br>Message: 3<br>Date: Mon, 3 May 2021 15:00:37 +1000<br>From: <dcook@prosentient.com.au><br>To: "'koha-devel'" <koha-devel@lists.koha-community.org><br>Cc: "'Tomas Cohen Arazi'" <tomascohen@theke.io>, "'Renvoize, Martin'"<br>    <martin.renvoize@ptfs-europe.com><br>Subject: [Koha-devel] HTTP/HTTPS cheme in Base Path in API<br>    documentation<br>Message-ID: <027901d73fd9$4218be90$c64a3bb0$@prosentient.com.au><br>Content-Type: text/plain;    charset="us-ascii"<br><br>Hi all,<br><br>I just noticed on a HTTPS site that the Base URL at /api/v1/.html was listed<br>as HTTP rather than HTTPS.<br><br>Looking at Mojolicious::Plugin::OpenAPI, it seems that it's hard-coded to<br>HTTP *if* a scheme isn't specified in the spec:<br>https://github.com/jhthorsen/mojolicious-plugin-openapi/blob/master/lib/Mojo<br>licious/Plugin/OpenAPI/SpecRenderer.pm#L406 <br><br>Looking at<br>https://swagger.io/docs/specification/2-0/api-host-and-base-path/, we could<br>be setting "schemes" there. <br><br>I'm not 100% sure what we should do here. Maybe nothing. But it just seem<br>unfortunate to be showing a HTTP link on a HTTPS page especially for an<br>API...<br><br>David Cook<br>Software Engineer<br>Prosentient Systems<br>Suite 7.03<br>6a Glen St<br>Milsons Point NSW 2061<br>Australia<br><br>Office: 02 9212 0899<br>Online: 02 8005 0595<br><br><br><br><br><br>------------------------------<br><br>Message: 4<br>Date: Mon, 3 May 2021 09:06:29 +0200<br>From: Julian Maurice <julian.maurice@biblibre.com><br>To: koha-devel@lists.koha-community.org<br>Subject: Re: [Koha-devel] Why is config ($KOHA_CONF) stored in<br>    memcached ?<br>Message-ID: <c500fed5-8df4-30bc-bc09-31889e3736a2@biblibre.com><br>Content-Type: text/plain; charset=utf-8; format=flowed<br><br>If you're interested there is also bug 28278 that divides by 3 the time <br>needed to parse $KOHA_CONF:<br>https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28278<br><br>Le 02/05/2021 à 14:52, Julian Maurice a écrit :<br>> Patch is ready to be tested at <br>> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28276 ;)<br>> <br>> Le 01/05/2021 à 14:53, Tomas Cohen Arazi a écrit :<br>>> I vote for fixing it so the file is only hit the first time.<br>>><br>>> El vie, 30 abr 2021 a las 14:19, Julian Maurice <br>>> (<julian.maurice@biblibre.com <mailto:julian.maurice@biblibre.com>>) <br>>> escribió:<br>>><br>>>     Hi all,<br>>><br>>>     Maybe it's a dumb question, but I don't understand why the config is<br>>>     stored in memcached as:<br>>>     - memcached server address is in this config, so we need to read<br>>>     $KOHA_CONF file first in order to connect to memcached server<br>>>     - config is kept in memory forever ($C4::Context::context), so we<br>>>     shouldn't need the cache once starman has started.<br>>><br>>>     If you add a warning in Koha::Config::read_from_file, you'll see that<br>>>     the file is read 3 times per worker, even when the config already <br>>> exist<br>>>     in cache (it's read 4 times when the cache is empty).<br>>>     It's read each time we call Koha::Cache->new (+ in <br>>> C4::Context->new if<br>>>     the cache is empty)<br>>><br>>>     Shouldn't we read the file only in C4::Context->new (without using<br>>>     cache), and make Koha::Cache use C4::Context->config instead ?<br>>><br>>>     --     Julian Maurice<br>>>     BibLibre<br>>>     _______________________________________________<br>>>     Koha-devel mailing list<br>>>     Koha-devel@lists.koha-community.org<br>>>     <mailto:Koha-devel@lists.koha-community.org><br>>>     https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>>>     <br>>> <https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel><br>>>     website : https://www.koha-community.org/<br>>>     <https://www.koha-community.org/><br>>>     git : https://git.koha-community.org/ <br>>> <https://git.koha-community.org/><br>>>     bugs : https://bugs.koha-community.org/<br>>>     <https://bugs.koha-community.org/><br>>><br>>><br>>><br>>> -- <br>>> Tomás Cohen Arazi<br>>> Theke Solutions (http://theke.io <http://theke.io/>)<br>>> ✆ +54 9351 3513384<br>>> GPG: B2F3C15F<br>> <br><br>-- <br>Julian Maurice<br>BibLibre<br><br><br>------------------------------<br><br>Subject: Digest Footer<br><br>_______________________________________________<br>Koha-devel mailing list<br>Koha-devel@lists.koha-community.org<br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>website : https://www.koha-community.org/<br>git : https://git.koha-community.org/<br>bugs : https://bugs.koha-community.org/<br><br><br>------------------------------<br><br>End of Koha-devel Digest, Vol 186, Issue 3<br>******************************************<br></div><br><br>NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.<br></body></html>