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

Avoid caching language strings and formatted strings in modinfo

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3
    • Fix Version/s: None
    • Component/s: Caching, Course
    • Labels:
      None
    • Affected Branches:
      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

              Assignee:
              Unassigned Unassigned
              Reporter:
              marina Marina Glancy
              Participants:
              Component watchers:
              Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: