Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
aeb8e78
)
Merge branch 'm24_MDL-36364_Improve_the_deletion_logic' of https://github.com/scara...
author
Dan Poltawski
<dan@moodle.com>
Fri, 16 Nov 2012 07:24:24 +0000
(15:24 +0800)
committer
Dan Poltawski
<dan@moodle.com>
Fri, 16 Nov 2012 07:24:24 +0000
(15:24 +0800)
Conflicts:
cache/stores/file/lib.php
cache/stores/file/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/cache/stores/file/lib.php
b/cache/stores/file/lib.php
index
0a18b3a
..
19fdfb6
100644
(file)
--- a/
cache/stores/file/lib.php
+++ b/
cache/stores/file/lib.php
@@
-373,9
+373,13
@@
class cachestore_file implements cache_store, cache_is_key_aware {
public function delete($key) {
$filename = $key.'.cache';
$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;
}
/**
@@
-682,4
+686,4
@@
class cachestore_file implements cache_store, cache_is_key_aware {
public function my_name() {
return $this->name;
}
-}
\ No newline at end of file
+}