Moodle
  1. Moodle
  2. MDL-36111

Cache API - typo's and other trivial non-descript cleanup

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Caching
    • Labels:
    • Rank:
      44877

      Description

      A few small obvious things to fix up. Big thanks to Fred for looking over the code to find these!

        Issue Links

          Activity

          Hide
          Frédéric Massart added a comment -

          Noticed this as well. Just an argument which is never used because not set:

          diff --git a/cache/classes/factory.php b/cache/classes/factory.php
          index 729a46b..32415fc 100644
          --- a/cache/classes/factory.php
          +++ b/cache/classes/factory.php
          @@ -135,7 +135,7 @@ class cache_factory {
                   }
                   $definition = $this->create_definition($component, $area, $aggregate);
                   $definition->set_identifiers($identifiers);
          -        $cache = $this->create_cache($definition, $identifiers);
          +        $cache = $this->create_cache($definition);
                   if ($definition->should_be_persistent()) {
                       $this->cachesfromdefinitions[$definitionname] = $cache;
                   }
          
          Show
          Frédéric Massart added a comment - Noticed this as well. Just an argument which is never used because not set: diff --git a/cache/classes/factory.php b/cache/classes/factory.php index 729a46b..32415fc 100644 --- a/cache/classes/factory.php +++ b/cache/classes/factory.php @@ -135,7 +135,7 @@ class cache_factory { } $definition = $this->create_definition($component, $area, $aggregate); $definition->set_identifiers($identifiers); - $cache = $this->create_cache($definition, $identifiers); + $cache = $this->create_cache($definition); if ($definition->should_be_persistent()) { $this->cachesfromdefinitions[$definitionname] = $cache; }
          Hide
          Sam Hemelryk added a comment -

          Putting this up for integration now.

          Show
          Sam Hemelryk added a comment - Putting this up for integration now.
          Hide
          Dan Poltawski added a comment -

          Integrated, thanks Sam

          Show
          Dan Poltawski added a comment - Integrated, thanks Sam
          Hide
          Dan Poltawski added a comment -

          Looks good.

          Show
          Dan Poltawski added a comment - Looks good.
          Hide
          Matteo Scaramuccia added a comment -

          What about adding an extra commit to remove ;; in cache/?

          # find cache/ -type f -name '*.php' -exec grep -H -n -E ';;$' {} \; | sort
          cache/classes/dummystore.php:267:        return $cache;;
          cache/stores/mongodb/lib.php:242:        return false;;
          cache/stores/static/lib.php:363:        return $cache;;
          

          (More in MDL-36357)

          Show
          Matteo Scaramuccia added a comment - What about adding an extra commit to remove ;; in cache/ ? # find cache/ -type f -name '*.php' -exec grep -H -n -E ';;$' {} \; | sort cache/classes/dummystore.php:267: return $cache;; cache/stores/mongodb/lib.php:242: return false;; cache/stores/static/lib.php:363: return $cache;; (More in MDL-36357 )
          Hide
          Dan Poltawski added a comment -

          Matteo, thanks! I have done a quick commit to remove those new ones, since you pointed them out.

          Show
          Dan Poltawski added a comment - Matteo, thanks! I have done a quick commit to remove those new ones, since you pointed them out.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Many, many thanks for your effort!

          Millions of people will enjoy the results of your work, yay!

          Closing as fixed. Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Many, many thanks for your effort! Millions of people will enjoy the results of your work, yay! Closing as fixed. Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: