[Koha-bugs] [Bug 20930] New: Handle YAML type system preferences as parsed references

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 13 12:40:11 CEST 2018


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

            Bug ID: 20930
           Summary: Handle YAML type system preferences as parsed
                    references
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: lari.taskula at jns.fi
        QA Contact: testopia at bugs.koha-community.org

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 could 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.

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


More information about the Koha-bugs mailing list