@@ -, +, @@ --- C4/Context.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/C4/Context.pm +++ a/C4/Context.pm @@ -504,12 +504,13 @@ with this method. =cut -my $syspref_cache = Koha::Cache->get_instance(); +my $syspref_cache; my $use_syspref_cache = 1; sub preference { my $self = shift; my $var = shift; # The system preference to return + $syspref_cache ||= Koha::Cache->get_instance(); $var = lc $var; my $cached_var = $use_syspref_cache --