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

rebuild_course_cache runs over and over for empty course

    XMLWordPrintable

Details

    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • 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

    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

              Unassigned Unassigned
              tlevi Tony Levi
              Marina Glancy Marina Glancy
              Ankit Agarwal Ankit Agarwal
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Sep/13