You are here

function date_api_views_clear in Date 6.2

Same name and namespace in other branches
  1. 7 date_views/date_views.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_api.module, line 2342
This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.

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%'");
}