Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-58407

Avoid caching language strings and formatted strings in modinfo

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.3
    • Caching, Course
    • None
    • MOODLE_33_STABLE

      In MDL-41809 the bug was fixed when $PAGE->context was not available during course cache building, calling format_string() resulted in debugging messages.

      The bigger problem is that course cache may contain strings that were processed through filters or taken from language packs. It is not guaranteed that during the display of these strings the same filters or the same language is used.

      Possible solution is to make class lang_string cacheable and implement similar cacheable class for formatted string/text and use new lang_string() instead of get_string() and this new class instead of format_string/format_text

            Unassigned Unassigned
            marina Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.