<?php

function Stdcache_cacheclear_show()
{
	$root =& XCube_Root::getSingleton();
	$cache =& $root->getCacheSystem();
	if (!$cache->enableCache()) {
		return false;
	}

	if($handler = opendir(XOOPS_CACHE_PATH)) {
		while(($file = readdir($handler)) !== false) {
			if(preg_match("/\w+\.cache\.html$/", $file, $matches)) {
				@unlink($matches[0]);
			}
		}
		closedir($handler);
	}
	
	$block['dmy'] = true;
	return $block;
}

?>