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

Caching for repository_instance_config sub-par

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE

      Description

      Discovered during testing of MDL-67812 which adds a new repository.

      We currently only have one cache for repositories, and it is defined as a per-request cache.
      It stores several sets of prefixed data:

      1. instance records (from the repository and repository_instances tables (cache keys prefixed with i:)
      2. types by id (prefixed with types: or typesvis:)
      3. types by name (prefixed with typename:)
      4. all data (prefixed with all:)
      5. options (prefixed with ops:)

      In almost all of these cases they can be moved to an application cache, and some probably don't need to be stored in cache at all.

      This should save activerepos * 2 DB reads on any page which uses a file picker.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              dobedobedoh Andrew Nicols
              Participants:
              Component watchers:
              Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: