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

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.5
    • Component/s: Caching
    • Labels:
    • Testing Instructions:
      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.
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-37500-m25

      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

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

                Dates

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