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

Cache data source aggregation is totally busted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6.7, 2.7.4
    • 2.8
    • Caching
    • MOODLE_28_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • 47832-29-removed
    • Hide
      1. Run unit tests
      2. On a site with lots (a dozen at least, three deep preferable) of categories and even more courses) browse around and be sure to visit:
        • Course & category management page
        • Log in as a student and check the my profile page
        • Create a quiz with a few questions and preview/take it
      Show
      Run unit tests On a site with lots (a dozen at least, three deep preferable) of categories and even more courses) browse around and be sure to visit: Course & category management page Log in as a student and check the my profile page Create a quiz with a few questions and preview/take it

      In the cache API there is functionality to provide a data source aggregate.
      Sometime referred to as just cache aggregate in code.
      This feature is largely undocumented other than the odd comment about it being a super advanced feature.
      I can vaguely remember that it came about while the API was being planned however looking at the code there now there is no way it could possibly work, the code is broken and the concept has not being understood in work that has gone on in the past and the "feature" itself is now confused in code.

      The idea behind the data source aggregate was to allow for sub-classed data sources to be used for a single definition so that the calling code could seamlessly switch to the appropriate data source for a definition based upon its own logic as it sees fit.
      The data source aggregate would form part of the key for items stored in the cache backend keeping data for a definition separated for different aggregates.
      I remember one of the big selling points for this feature was that you could create data sources to serve user preferences and have them serve a single definition. Such that you could interact with the cache as a singleton because the user preferences were handled by data sources.

      No one has used this feature - obviously - because it does not work.

      We have two options really:

      1. Remove the feature entirely - surely no one will mind because it doesn't work.
      2. Fix the feature + add unit tests - easy enough - and document it.

            samhemelryk Sam Hemelryk
            samhemelryk Sam Hemelryk
            Frédéric Massart Frédéric Massart
            Dan Poltawski Dan Poltawski
            John Okely John Okely
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.