The memcached config can be read from ENV or koha-conf.xml In order to remove any ambiguity, let's inform the user which config is used.
Created attachment 55329 [details] [review] Bug 17274: Display the place where the memcached is picked The memcached config can be read from ENV or koha-conf.xml In order to remove any ambiguity, let's inform the user which config is used. Test plan: 1/ Define the memcached config in ENV and $KOHA_CONF => Go on about page, you should get a warning 2/ Define the memcached config in ENV and not in $KOHA_CONF => Go on about page, you should get a warning 3/ Do not defined the memcached config in ENV or $KOHA_CONF => Go on about page, you should get a warning 4/ Define the memcached config in $KOHA_CONF and not in ENV => Go on about page, you should not get a warning, this is the expected config
Jonathan: Maybe it is better to keep warnings on 'System information'?
(In reply to Tomás Cohen Arazi from comment #2) > Jonathan: Maybe it is better to keep warnings on 'System information'? The place where the warning is displayed (i.e. same place as info about memcached configuration / Bug 17261) makes sense to me.
Created attachment 55479 [details] [review] Bug 17274: Display the place where the memcached is picked The memcached config can be read from ENV or koha-conf.xml In order to remove any ambiguity, let's inform the user which config is used. Test plan: 1/ Define the memcached config in ENV and $KOHA_CONF => Go on about page, you should get a warning 2/ Define the memcached config in ENV and not in $KOHA_CONF => Go on about page, you should get a warning 3/ Do not defined the memcached config in ENV or $KOHA_CONF => Go on about page, you should get a warning 4/ Define the memcached config in $KOHA_CONF and not in ENV => Go on about page, you should not get a warning, this is the expected config Followed test plan, works as expected. Signed-off-by: Marc <veron@veron.ch>
Where is memcached server extracted from koha-conf.xml? I don't see it in Koha::Cache.pm.
(In reply to Frédéric Demians from comment #5) > Where is memcached server extracted from koha-conf.xml? I don't see it in > Koha::Cache.pm. koha::Cache.pm (86~93): $self->{'namespace'} ||= $ENV{MEMCACHED_NAMESPACE}; my @servers = split /,/, $ENV{MEMCACHED_SERVERS} || ''; unless ( $self->{namespace} and @servers ) { my $koha_config = Koha::Config->read_from_file( Koha::Config->guess_koha_conf() ); $self->{namespace} ||= $koha_config->{config}{memcached_namespace} || 'koha'; @servers = split /,/, $koha_config->{config}{memcached_servers} // '' unless @servers; }
(In reply to Frédéric Demians from comment #5) > Where is memcached server extracted from koha-conf.xml? I don't see it in > Koha::Cache.pm. In current master, it reads it from koha-conf.xml BUT it prefers ENV if available. That's why I mentioned it is safe for stable.
Created attachment 57056 [details] [review] [PASSED QA] Bug 17274: Display the place where the memcached is picked The memcached config can be read from ENV or koha-conf.xml In order to remove any ambiguity, let's inform the user which config is used. Test plan: 1/ Define the memcached config in ENV and $KOHA_CONF => Go on about page, you should get a warning 2/ Define the memcached config in ENV and not in $KOHA_CONF => Go on about page, you should get a warning 3/ Do not defined the memcached config in ENV or $KOHA_CONF => Go on about page, you should get a warning 4/ Define the memcached config in $KOHA_CONF and not in ENV => Go on about page, you should not get a warning, this is the expected config Followed test plan, works as expected. Signed-off-by: Marc <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pushed to master for 16.11, thanks Jonathan!
enhancement, passing for 16.05