You are here

function xmlsitemap_delete_cache_files in XML sitemap 6

Delete the cache file used for the sitemap content, and mark the sitemap as changed.

1 string reference to 'xmlsitemap_delete_cache_files'
xmlsitemap_xmlsitemap_operations in ./xmlsitemap.module
Implementation of hook_xmlsitemap_operations().

File

./xmlsitemap.module, line 260
Creates a sitemap compatible with the sitemaps.org schema.

Code

function xmlsitemap_delete_cache_files() {
  $parent_directory = variable_get('xmlsitemap_cache_directory', file_directory_path() . '/xmlsitemap');
  if (!is_dir($parent_directory)) {
    return;
  }
  file_scan_directory($parent_directory, 'xsm-.*\\.xml', array(
    '.',
    '..',
    'CVS',
  ), 'file_delete', FALSE);
  xmlsitemap_flag_sitemap();
  return;
}