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

--- Comment #1 from Lari Taskula <[email protected]> ---
Created attachment 76382
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76382&action=edit
Bug 20930: Dump and load system preferences of YAML/JSON type

Currently, C4::Context->preference('YAMLpref') returns a string that needs to
be
parsed by any code using the preference.

My suggestion is to return a parsed version instead (a hash/array ref or a
string)
and using the syspref cache with the parsed value. Like this, we could:
- centralize parsing of YAML system preferences
- optimize use of system preference cache by caching the parsed version
instead.
  Parse once and store in cache; no need to re-parse on each call!

We can centralize this functionality into Koha::Config::SysPref->value() (used
by
C4::Context->preference). Use database column systempreferences.type with value
of
"YAML" to trigger this functionality in "value()"-method.

To test:
1. prove t/db_dependent/Context.t

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to