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

get_user_preferences caching

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5.3, 3.6
    • 3.5.4
    • General, Performance
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE
    • MDL-64049-master
    • Hide
      1. Copy the attached test.php into the document root
      2. Login to Moodle
      3. Access /test.php in the site
        1. Confirm you get an empty page

      Before this patch there is one call to fetch the DB records per call to get_user_preferences().

      Show
      Copy the attached test.php into the document root Login to Moodle Access /test.php in the site Confirm you get an empty page Before this patch there is one call to fetch the DB records per call to get_user_preferences() .

    Description

      When get_user_preferences is called with the id of the current user it does not make use of the cache in the current $USER object.

      We can make use of the $USER when $userid matches $USER->id.

      Attachments

        1. test.php
          0.3 kB
        2. screenshot-1.png
          screenshot-1.png
          26 kB

        Activity

          People

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Peter Dias Peter Dias
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Jan/19

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m