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

get_user_preferences caching

    XMLWordPrintable

Details

    • 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
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Clockify

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