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