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

rebuild_course_cache runs over and over for empty course

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. create empty site
      2. enable the DB query logging
      3. refresh the frontpage twice, second time make sure there is no writing to course.modinfo and course.sectioncache fields
      4. add a module on frontpage, make sure it is displayed immediately
      Show
      create empty site enable the DB query logging refresh the frontpage twice, second time make sure there is no writing to course.modinfo and course.sectioncache fields add a module on frontpage, make sure it is displayed immediately
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:

      Description

      I've just done a fresh vanilla 2.5 install, and every page load is calling rebuild_course_cache for course 1.

      This appears to be a bug from sectioncache, where it can be empty and this triggers the rebuild from course_modinfo::__construct

      I think the simple answer is to remove the empty() check there.

      May relate to MDL-38448.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Sep/13