diff options
Diffstat (limited to 'phpBB/includes/acm/acm_file.php')
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 175ef0ad81..f79a94c987 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -176,6 +176,32 @@ class acm } /** + * Purge cache data + */ + function purge() + { + // Purge sql data + $dir = opendir($this->cache_dir); + while (($entry = readdir($dir)) !== false) + { + if (strpos($entry, 'sql_') !== 0 && strpos($entry, 'data_') !== 0 && strpos($entry, 'ctpl_') !== 0 && strpos($entry, 'tpl_') !== 0) + { + continue; + } + + @unlink($this->cache_dir . $entry); + } + @closedir($dir); + + unset($this->vars); + unset($this->var_expires); + unset($this->sql_rowset); + unset($this->sql_row_pointer); + + $this->is_modified = false; + } + + /** * Destroy cache data */ function destroy($var_name, $table = '') |