index.*
files from super cache directory, or you can write a wordpress action called with wp cron
and delete hourly the same files.
Be sure that the directory of your cache is /wp-content/cache/supercache/www.yourdomain.com
:
add_action('init','delete_home_cache_hourly'); add_action('delete_home_cache_hourly_job','delete_home_cache_hourly_function'); function delete_home_cache_hourly_function(){ $dir = $_SERVER['DOCUMENT_ROOT']."/wp-content/cache/supercache/".$_SERVER['HTTP_HOST']."/"; $file = "index.html"; unlink($dir.$file); unlink($dir.$file.".gz"); } function delete_home_cache_hourly(){ if(!wp_next_scheduled('delete_home_cache_hourly_job')) wp_schedule_event (time(), 'hourly', 'delete_home_cache_hourly_job'); }