예제 #1
0
 /**
  * Delete any file that is older than 24 hours from the whole /cache folder (recursively)
  * except index.html files and hiddenfiles (starting with .)
  *
  * @static
  *
  * @return string empty string on success, error message otherwise.
  */
 function prune_page_cache()
 {
     global $cache_path;
     load_funcs('tools/model/_system.funcs.php');
     // check and try to repair cache folders
     system_check_caches();
     $path = trailing_slash($cache_path);
     $first_error = '';
     PageCache::deleteDirContent($path, $first_error);
     return $first_error;
 }