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

Caching of the site identifier is not robust enough quite yet.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.2, 2.5
    • Fix Version/s: 2.4.4
    • Component/s: Caching
    • Labels:
    • Testing Instructions:
      Hide
      1. Test an upgrade.
      2. Test a fresh install.
      3. Apply David's patch on MDL-34401 if its not being integrated at the same time.
      4. Delete the cache config file from your dataroot directory (moodledata/muc/config.php)
      5. Browse to the sites front page.
      Show
      Test an upgrade. Test a fresh install. Apply David's patch on MDL-34401 if its not being integrated at the same time. Delete the cache config file from your dataroot directory (moodledata/muc/config.php) Browse to the sites front page.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-38387-m25

      Description

      The cache now uses the site identifier as part of the hash prefixed to all keys.
      Within its handling it attempts to load the site identifier from the cache config. If its not there then the cache config tries to load it from the database config.
      The issue arises that if you write a cache definition that is used before the database cache then you can find yourself in a situation where the cache ends up in an infinite loop while trying to initialise.
      The cause of this is that the cache initialisation is trying to use the cache API. That's a no-no the cache API cannot use caches or we risk the infinite initalisation issue.

      There's a simple fix for this luckily.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    13/May/13