You are here

function date_api_views_clear in Date 7

Same name and namespace in other branches
  1. 6.2 date_api.module \date_api_views_clear()

Rebuild the theme registry and all the caches. needed to pick up changes created by updated Views API and other changes to Views definitions.

File

date_views/date_views.module, line 96

Code

function date_api_views_clear() {
  if (db_table_exists('cache_content')) {
    db_query('DELETE FROM {cache_content}');
  }
  if (db_table_exists('cache_views')) {
    db_query('DELETE FROM {cache_views}');
  }
  if (db_table_exists('views_object_cache')) {
    db_query('DELETE FROM {views_object_cache}');
  }
  db_query("DELETE FROM {cache} where cid LIKE 'theme_registry%'");
}