[Koha-devel] Why is config ($KOHA_CONF) stored in memcached ?
Julian Maurice
julian.maurice at biblibre.com
Fri Apr 30 19:19:07 CEST 2021
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
More information about the Koha-devel
mailing list