[Koha-bugs] [Bug 11998] Syspref caching issues

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 4 12:42:36 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998

--- Comment #104 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
Code itself looks fine to me, but I'm a bit worried about some potential
problems this patch may introduce indirectly. As it would be now possible to
set up permanent & shared cache for system preferences (memcache, fastmmap), in
such installations we may expect some extra troubles, e.g. with:

- bunch of t/* tests (quite o lot of them) is still using ->set_preference()
insted of mock_preference() - they don't commit changes to the database, but
running them may now result in syspref "cache poisoning", affecting behaviour
of the other processes

- remaining code chunks which are dealing with systempreferences table directly
(installer, updatedatabase.pl, some tests and admin/maintenance scripts);
updatedatabase.pl seems to be OK (at least at the 1st glance), not sure about
installer - it does call clear_syspref_cache() 1+ time, but not necessarily
everywhere where it should do it / not at the each and every step (?)

- up to now, when a given script retrieved some preference once, it was
guaranted that all subsequent ->preference() calls during the script run will
return the same value; now it will always use the current value instead - I
guess sometimes that will be a good thing, and sometimes not so much - but
probably not very important in practical circumstances

Also there will be some (hopefully very) little performace hit due to caching
system overheads (and 10 sec deafult expire in case of Cache::Memory - but it
will affect only the long-running scripts) - how little, it remains to be seen
;)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list