function taxonomy_terms_static_reset

Same name in other branches
  1. 9 core/modules/taxonomy/taxonomy.module \taxonomy_terms_static_reset()
  2. 8.9.x core/modules/taxonomy/taxonomy.module \taxonomy_terms_static_reset()

Clear all static cache variables for terms.

4 calls to taxonomy_terms_static_reset()
TaxonomyHooksTestCase::testTaxonomyTermHooks in modules/taxonomy/taxonomy.test
Test that hooks are run correctly on creating, editing, viewing, and deleting a term.
TaxonomyQueryAlterTestCase::setupQueryTagTestHooks in modules/taxonomy/taxonomy.test
Sets up the hooks in the test module.
taxonomy_term_delete in modules/taxonomy/taxonomy.module
Delete a term.
taxonomy_term_save in modules/taxonomy/taxonomy.module
Saves a term object to the database.

File

modules/taxonomy/taxonomy.module, line 958

Code

function taxonomy_terms_static_reset() {
    drupal_static_reset('taxonomy_term_count_nodes');
    drupal_static_reset('taxonomy_get_tree');
    drupal_static_reset('taxonomy_get_tree:parents');
    drupal_static_reset('taxonomy_get_tree:terms');
    drupal_static_reset('taxonomy_get_parents');
    drupal_static_reset('taxonomy_get_parents_all');
    drupal_static_reset('taxonomy_get_children');
    entity_get_controller('taxonomy_term')->resetCache();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.