You are here

function lingotek_cache_clear in Lingotek Translation 7.7

Clear cached Lingotek-specific metadata for a given entity.

  • If entity_id is blank, then clear metadata for all entities of the type.
  • If both are blank, then clear metadata for all entities.
17 calls to lingotek_cache_clear()
LingotekEntity::deleteMetadataValue in lib/Drupal/lingotek/LingotekEntity.php
Deletes a Lingotek metadata value for this item
LingotekEntity::setMetadataValue in lib/Drupal/lingotek/LingotekEntity.php
Sets a Lingotek metadata value for this item.
LingotekSync::bulkSetAllTargetStatus in lib/Drupal/lingotek/LingotekSync.php
LingotekSync::deleteAccountInfo in lib/Drupal/lingotek/LingotekSync.php
Deletes Lingotek Account information from the Drupal database
LingotekSync::deleteTargetEntriesForAllDocs in lib/Drupal/lingotek/LingotekSync.php

... See full list

File

./lingotek.util.inc, line 3017
Utility functions.

Code

function lingotek_cache_clear($entity_type = NULL, $entity_id = NULL) {
  if ($entity_type == NULL && $entity_id == NULL) {
    cache_clear_all('lingotek__', 'cache', TRUE);
    return;
  }
  elseif ($entity_id == NULL) {
    cache_clear_all('lingotek__' . $entity_type . '__', 'cache', TRUE);
    return;
  }
  cache_clear_all('lingotek__' . $entity_type . '__' . $entity_id, 'cache');
}