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

$usecache inverted in get_all_versions_hash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Trivial Trivial
    • None
    • 2.7.7, 2.8, 2.9
    • General

      As reported by plushwork on IRC, get_all_versions_hash() sets a boolean for $usecache which determine whether to use MUC when fetching the list of plugins in a plugintype, however it seems to be reversed:

              $usecache = false;
              if (CACHE_DISABLE_ALL or (defined('IGNORE_COMPONENT_CACHE') and IGNORE_COMPONENT_CACHE)) {
                  $usecache = true;
              }
      // ...
                  if ($usecache) {
                      $plugs = core_component::get_plugin_list($type);
                  } else {
                      $plugs = self::fetch_plugins($type, $typedir);
                  }
      

      From my reading of this, we do not use the cache unless:

      1. CACHE_DISABLE_ALL is defined; or
      2. IGNORE_COMPONENT_CACHE is defined and truthful.

      Obviously those values suggest the opposite of the action.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Dave Cooper Dave Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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