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

Caches are currently shareable across sites and versions which can easily lead to ambiguous issues

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.4.1
    • 2.5
    • Caching
    • MOODLE_24_STABLE
    • MOODLE_25_STABLE
    • wip-MDL-37500-m25
    • Moderate
    • Hide
      1. Run unit tests
      2. Log in as an admin.
      3. Create some cache instances.
      4. Edit a definitions sharing option and set it to something.
      5. Test the cache to make sure it still works as expected.
      6. Repeat to test all options.
      Show
      Run unit tests Log in as an admin. Create some cache instances. Edit a definitions sharing option and set it to something. Test the cache to make sure it still works as expected. Repeat to test all options.

    Description

      Eloy and myself have been chatting about an issue that presently exists within MUC although we are not sure whether anyone has been affected yet or not.
      The issue stands that cache keys don't contain anything relating to the site or the version it is running.
      Because of this you are able to share caches between sites... which is great, providing the cache is "generic" like strings.
      Otherwise if anything about the data being stored is unique to the site or version things can go horribly wrong.
      Think questions being cached and database meta data.

      We've come up with a plan to address this in the following way:
      1. Add an option for cache definitions to specify the sharing options it supports.
      2. Add an option for store instances allowing users to select which of the supported options is used.
      3. Default to the strictest option by default which will always be siteid.

      Also worth pointing out that this is a potential security concern if we continue to add caches to stable branches so must be backported.

      Attachments

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              samhemelryk Sam Hemelryk
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Ankit Agarwal Ankit Agarwal
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/13