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

Avoid caching language strings and formatted strings in modinfo

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              marina Marina Glancy
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: