mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
MDL-36364 Improved the deletion logic to preserve the 'prescan' setting
This commit is contained in:
parent
6109f2112c
commit
f86ce2dcb6
10
cache/stores/file/lib.php
vendored
10
cache/stores/file/lib.php
vendored
@ -308,9 +308,13 @@ class cachestore_file implements cache_store, cache_is_key_aware {
|
||||
public function delete($key) {
|
||||
$filename = $key.'.cache';
|
||||
$file = $this->path.'/'.$filename;
|
||||
$result = @unlink($file);
|
||||
unset($this->keys[$filename]);
|
||||
return $result;
|
||||
|
||||
if (@unlink($file)) {
|
||||
unset($this->keys[$filename]);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user