diff --git a/cache.class.php b/cache.class.php index 33c7c23..fae7b6f 100644 --- a/cache.class.php +++ b/cache.class.php @@ -309,5 +309,19 @@ public function setExtension($ext) { public function getExtension() { return $this->_extension; } + + /** + * Clear All Cached Files + * + */ + public function clearCachedFiles(){ + $cacheDir = $this->getCachePath(); + $files = glob($cacheDir.'*'); // get all file names + foreach($files as $file){ // iterate files + if (is_file($file)) { + unlink($file);// delete file + } + } + } }