Merge branch 'm24_MDL-36364_Improve_the_deletion_logic' of https://github.com/scara...
authorDan Poltawski <dan@moodle.com>
Fri, 16 Nov 2012 07:24:24 +0000 (15:24 +0800)
committerDan Poltawski <dan@moodle.com>
Fri, 16 Nov 2012 07:24:24 +0000 (15:24 +0800)
Conflicts:
cache/stores/file/lib.php

1  2 
cache/stores/file/lib.php

@@@ -372,10 -307,14 +372,14 @@@ class cachestore_file implements cache_
       */
      public function delete($key) {
          $filename = $key.'.cache';
 -        $file = $this->path.'/'.$filename;
 +        $file = $this->file_path_for_key($key);
-         $result = @unlink($file);
-         unset($this->keys[$filename]);
-         return $result;
+         if (@unlink($file)) {
+             unset($this->keys[$filename]);
+             return true;
+         }
+         return false;
      }
  
      /**
      public function my_name() {
          return $this->name;
      }
--}
++}