Skip to content

Commit

Permalink
Fix * wildcard cache delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ADDCreative committed Apr 11, 2022
1 parent 66441f4 commit a863c05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion upload/system/library/cache.php
Expand Up @@ -37,7 +37,11 @@ public function set($key, $value) {
}

public function delete($key) {
$files = glob(DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.*');
if ($key == '*') {
$files = glob(DIR_CACHE . 'cache.*.*');
} else {
$files = glob(DIR_CACHE . 'cache.' . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.*');
}

if ($files) {
foreach ($files as $file) {
Expand Down

0 comments on commit a863c05

Please sign in to comment.