$cache_time) { $fp = fopen($filename, "w"); flock($fp, 2); fputs($fp, $content); fclose($fp); } } endif; if(!function_exists("xpress_block_cache_clear")): function xpress_cache_clear($mydirname) { $cache_dir = XOOPS_ROOT_PATH . '/cache/'; $cache_time = 0; if ($dh = opendir($cache_dir)) { while (($file = readdir($dh)) !== false) { if (preg_match('/^' . preg_quote($mydirname) . '/', $file)) { unlink($cache_dir.$file); } } closedir($dh); } } endif; ?>