Skip to content

Instantly share code, notes, and snippets.

@jgusta
Created April 25, 2017 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgusta/fb7eeee9a168c4fda53097a1bd515c31 to your computer and use it in GitHub Desktop.
Save jgusta/fb7eeee9a168c4fda53097a1bd515c31 to your computer and use it in GitHub Desktop.
The removed clearCacheFiles() function
function clearCacheFiles($cacheLocation) {
if (is_string($cacheLocation)) {
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($cacheLocation), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
if ($file->isFile()) {
@unlink($file->getPathname());
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment