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

MUC: Memcache should use configurable key names

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.4.4
    • 2.4.3
    • Caching
    • MOODLE_24_STABLE
    • MOODLE_24_STABLE
    • MDL-39448-master
    • Hide

      1. In admin settings, go to Plugins/Caching/Configuration.
      2. Under 'memcache', choose 'Add instance'.

      • There should be a 'Key prefix' field with a help button, limited to 5 characters. The default value for this field is 'mdl_'.

      3. Type an arbitrary name for the store, type a working memcache server into the 'Servers' box, and type 'xxx_' into the Prefix box, then create the store.

      • Store should be created OK.

      4. Click 'Edit store' next to the new store from the list.

      • Form should appear again, with 'xxx_' as prefix.

      5. Change prefix to 'yyy_' and save. Edit it again.

      • Should now show 'yyy_' to verify that edit worked.

      6. Cancel edit.

      7. Under 'Database meta information', edit settings and set the store to the newly-created memcache store.

      8. Browse a few pages to check that the cache appears to be working.

      9. If necessary, turn on 'performance info' in server settings (it's under debugging). Look at bottom of page.

      • Check that the 'core/databasemeta' cache information includes a line about cachestore_memcache and that it is mostly getting cache hits if you reload a page. (This is just to check it's really being used!)

      10. To simulate what would happen if you already had a memcache installed before the upgrade, manually edit the config file in muc/config.php inside your dataroot. Scroll down to find the one you added and manually delete the line: " 'prefix' => 'yyy_',".

      11. Reload the Moodle caching settings page.

      • Check the page manages to load.

      12. Edit the store you added.

      • Check it says mdl_ on the settings page.
      Show
      1. In admin settings, go to Plugins/Caching/Configuration. 2. Under 'memcache', choose 'Add instance'. There should be a 'Key prefix' field with a help button, limited to 5 characters. The default value for this field is 'mdl_'. 3. Type an arbitrary name for the store, type a working memcache server into the 'Servers' box, and type 'xxx_' into the Prefix box, then create the store. Store should be created OK. 4. Click 'Edit store' next to the new store from the list. Form should appear again, with 'xxx_' as prefix. 5. Change prefix to 'yyy_' and save. Edit it again. Should now show 'yyy_' to verify that edit worked. 6. Cancel edit. 7. Under 'Database meta information', edit settings and set the store to the newly-created memcache store. 8. Browse a few pages to check that the cache appears to be working. 9. If necessary, turn on 'performance info' in server settings (it's under debugging). Look at bottom of page. Check that the 'core/databasemeta' cache information includes a line about cachestore_memcache and that it is mostly getting cache hits if you reload a page. (This is just to check it's really being used!) 10. To simulate what would happen if you already had a memcache installed before the upgrade, manually edit the config file in muc/config.php inside your dataroot. Scroll down to find the one you added and manually delete the line: " 'prefix' => 'yyy_',". 11. Reload the Moodle caching settings page. Check the page manages to load. 12. Edit the store you added. Check it says mdl_ on the settings page.

      If you want to use different Moodle instances with the same memcache server, it is necessary for keys to have different names.

      At present, all keys are prefixed with 'mdl_' (see MDL-38205). I propose to make this configurable when adding a memcache instance.

            quen Sam Marshall
            quen Sam Marshall
            Sam Hemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 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.