Go to file
Julian Maurice 550f3e2999 Bug 28276: Do not fetch config ($KOHA_CONF) from memcached
memcached address and namespace are in $KOHA_CONF, so it is required to
read it before being able to access the cache. And after that,
configuration is kept in memory forever. Storing this in memcached is
useless and even counter-productive, since Koha reads both the file and
the cache

This patch addresses this issue by removing the cache-related code from
C4::Context->new.
It means that C4::Context->new will always read the configuration file,
so this patch also replaces inappropriate calls to
C4::Context->new->config by appropriate calls to C4::Context->config

It also fixes a bug where C4::Context->new would ignore the filepath
given in parameters if there was something in cache.

It also removes a problematic call to Koha::Caches->get_instance.
Because this call was outside of any subroutine, it would have happened
before the initialization of $C4::Context::context (which happen in
C4::Context::import)

Test plan:
1. Do not apply the patch yet
2. Add the following line at the beginning of Koha::Config::read_from_file
    warn "read_from_file($file)";
   This will allow you to check how many times the file is read.
3. Flush memcached and restart starman
4. Check the logs, you should see "read_from_file" a bunch of times
5. Apply the patch
6. Re-add the line from step 2
7. Flush memcached and restart starman
8. Check the logs, you should see "read_from_file" only once
9. Make sure the memcached config from $KOHA_CONF (memcached_servers,
   memcached_namespace) is taken into account by checking the About page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b65d099d7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2021-05-12 16:32:32 +02:00
C4 Bug 28276: Do not fetch config ($KOHA_CONF) from memcached 2021-05-12 16:32:32 +02:00
Koha Bug 28276: Do not fetch config ($KOHA_CONF) from memcached 2021-05-12 16:32:32 +02:00
acqui Bug 27828: (bug 24469 follow-up) Add missing import 2021-03-04 13:18:22 +01:00
admin Bug 28276: Do not fetch config ($KOHA_CONF) from memcached 2021-05-12 16:32:32 +02:00
api Bug 18729: (follow-up) Adjust API to new spec 2021-04-22 16:40:28 +02:00
authorities Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
basket Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
bin Bug 20582: Turn Koha into a Mojolicious application 2020-10-06 12:00:04 +02:00
catalogue Bug 28213: Prevent crash if patron or club deleted after search to hold 2021-04-30 11:10:59 +02:00
cataloguing Bug 27739: Advanced editor should use DefaultCountryField008 preference 2021-04-22 15:58:39 +02:00
circ Bug 21883: Pass the item to the template 2021-04-29 15:11:45 +02:00
clubs Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
course_reserves Bug 25898: Fix new occurrences 2020-10-15 13:56:41 +02:00
debian Bug 14300: Add %P to SIP LogPattern 2021-04-29 15:22:15 +02:00
docs Bug 28244: Fix typo in Ukrainian in history 2021-05-11 12:07:08 +02:00
errors Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
etc Bug 14300: Add %P to SIP LogPattern 2021-04-29 15:22:15 +02:00
ill Bug 22818: Add generation and sending of notices 2020-11-11 08:35:10 +01:00
installer Bug 28298: fix DB update 19.12.00.076 2021-05-12 15:58:39 +02:00
koha-tmpl Bug 26471: Remove invalid Map URL 2021-05-12 16:23:05 +02:00
labels Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
members Bug 26940: don't reset debarredcomment on patron update 2021-04-29 11:47:16 +02:00
misc Bug 28276: Do not fetch config ($KOHA_CONF) from memcached 2021-05-12 16:32:32 +02:00
offline_circ Bug 24083: Add support for unseen_renewals 2020-11-11 16:09:58 +01:00
opac Bug 27529: Choose patron's branch or item's homebranch if following group rules and patron cannot choose branch 2021-04-22 16:21:36 +02:00
patron_lists Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
patroncards Bug 27716: Update permissions for patroncards creator 2021-03-19 16:25:37 +01:00
plugins Bug 24633: Add support for gitlab searching of plugins 2020-11-06 15:55:17 +01:00
pos Bug 27796: Centralise payment/transaction type handling 2021-04-22 15:51:19 +02:00
reports Bug 7806: Fix remaining occurrences of 0000-00-00 2021-03-04 10:24:48 +01:00
reserve Bug 28118: Default to current branch when placing hold 2021-04-22 15:57:39 +02:00
reviews Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
rotating_collections Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
serials Bug 7806: Fix remaining occurrences of 0000-00-00 2021-03-04 10:24:48 +01:00
services Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
skel Bug 11078: Add locking to rebuild_zebra 2014-02-28 22:21:41 +00:00
suggestion Bug 7806: Fix remaining occurrences of 0000-00-00 2021-03-04 10:24:48 +01:00
svc Bug 27061: Remove duplicate permission check in svc/mana/search 2021-05-11 12:09:40 +02:00
t Bug 27842: Add tests 2021-05-12 15:58:29 +02:00
tags Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
tmp/modified_authorities
…
tools Bug 21818: Replace AutoCommit flag with DBIx transaction in stage-marc-import.pl 2021-04-30 10:37:18 +02:00
virtualshelves Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
xt Bug 26971: Remove obsolete test file translatable-templates.t 2020-11-09 11:20:43 +01:00
.editorconfig Bug 24774: Set JSON indentation of 2 spaces in .editorconfig 2020-03-19 09:24:52 +00:00
.eslintrc.json Bug 23834: Add default ESLint configuration 2019-11-03 08:02:39 +00:00
.gitignore Bug 20427: Convert OPAC LESS to SCSS 2018-08-09 15:17:07 +00:00
.htaccess
…
.mailmap Bug 26621: Adjust .mailmap to reduce the number of invalid authors 2020-10-15 12:56:30 +02:00
.perlcriticrc Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
.scss-lint.yml Bug 21237: Clean up staff client SCSS 2018-08-24 16:23:25 +00:00
INSTALL Bug 26617: Update INSTALL file to include koha-testing-docker and Gitlab links 2020-10-15 12:56:30 +02:00
Koha.pm Bug 28244: DBRev 20.11.05.004 2021-05-11 12:08:08 +02:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
Makefile.PL Bug 26363: Provide a systemd unit file for koha-worker for source installs 2021-03-02 08:31:29 +01:00
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.md Bug 27092: Remove note about "synced repo" from README.md 2020-11-25 16:31:58 +01:00
README.robots
…
about.pl Bug 28276: Do not fetch config ($KOHA_CONF) from memcached 2021-05-12 16:32:32 +02:00
app.psgi Bug 20582: Fix PSGI file when behind a reverse proxy 2020-10-06 12:00:04 +02:00
changelanguage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
cpanfile Bug 26848: Fix Readonly dependency in cpanfile 2021-01-14 17:18:36 +01:00
fix-perl-path.PL Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
gulpfile.js Bug 27072: Don't process staff interface CSS with rtlcss 2020-11-24 21:27:59 +01:00
help.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
koha_perl_deps.pl Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
kohaversion.pl Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
mainpage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
package.json Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00
rewrite-config.PL Bug 26290: Make Makefile.PL aware of SMTP configs 2020-10-02 15:27:18 +02:00
yarn.lock Bug 25067: Move PO file manipulation code into gulp tasks 2020-11-06 09:46:11 +01:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo