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

The MUC cache admin page regularly reports the wrong number of mapped caches

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1: Count default mappings

      • Visit cache/admin.php
      • Search 'edit mappings' on the page. Take note of the total found.
      • Add the values of each store mappings count in the Configured store instances, and verify that it totals the count of the edit mappings string minus one (That string re-occurs once in the page outside of the definitions).
      • This means that every default mapped store is now contributing a count in the store mappings total.
      • Search 'edit sharing' on the page, and verify it is exactly equal to the count of the 'Default file store for application caches'.

      2: Custom mappings

      • Add a new file cache called 'filetest'
      • Verify this cache has a count of 0.
      • Edit the 'coursemodinfo' definition to have filetest as its only mapping.
      • Verify that the count for 'filetest' is now at 1, and that the default application store count has decreased by 1.
      • At the bottom of the page, edit the stores used when no mapping is present, and set application to 'filetest'.
      • Verify that all the application caches are now on 'filetest' and that the default application store has a count of 0.
      • This means that the counting is correct for Application caches.
      • Take note of the count of the default store for session caches.
      • Edit the stores used when no mapping is present, and set the session cache default to 'filetest'.
      • Verify that the default session store is at 0, and that the filetest store has increased by the old value of the default session store.
      • This shows that session is also behaving correctly.

      Request caches are not easily testable, as there is no core request cache that an instance can be created from.

      Show
      1: Count default mappings Visit cache/admin.php Search 'edit mappings' on the page. Take note of the total found. Add the values of each store mappings count in the Configured store instances, and verify that it totals the count of the edit mappings string minus one (That string re-occurs once in the page outside of the definitions). This means that every default mapped store is now contributing a count in the store mappings total. Search 'edit sharing' on the page, and verify it is exactly equal to the count of the 'Default file store for application caches'. 2: Custom mappings Add a new file cache called 'filetest' Verify this cache has a count of 0. Edit the 'coursemodinfo' definition to have filetest as its only mapping. Verify that the count for 'filetest' is now at 1, and that the default application store count has decreased by 1. At the bottom of the page, edit the stores used when no mapping is present, and set application to 'filetest'. Verify that all the application caches are now on 'filetest' and that the default application store has a count of 0. This means that the counting is correct for Application caches. Take note of the count of the default store for session caches. Edit the stores used when no mapping is present, and set the session cache default to 'filetest'. Verify that the default session store is at 0, and that the filetest store has increased by the old value of the default session store. This shows that session is also behaving correctly. Request caches are not easily testable, as there is no core request cache that an instance can be created from.
    • Affected Branches:
      MOODLE_38_STABLE
    • Pull 3.10 Branch:
      MDL-68440-310
    • Pull Master Branch:
      MDL-68440-master

      Description

      Eg it says 3 for APCu, 2 for local file, and 0 for redis and everything else, but this is clearly wrong and when you scroll down it shows you where things are really mapped. In this case many are to the default caches but also there is a bunch mapped to redis which are not showing. As far as I'm aware this affect every moodle version from since MUC landed in 2.7

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              peterburnett Peter Burnett
              Reporter:
              brendanheywood Brendan Heywood
              Peer reviewer:
              Brendan Heywood
              Integrator:
              Víctor Déniz Falcón
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: