public function Translator::clearLanguageCache

Clears the language cache for this translator.

Overrides TranslatorInterface::clearLanguageCache

File

src/Entity/Translator.php, line 361

Class

Translator
Entity class for the tmgmt_translator entity.

Namespace

Drupal\tmgmt\Entity

Code

public function clearLanguageCache() {
  $this->languageCache = array();
  \Drupal::cache('data')
    ->delete('tmgmt_languages:' . $this->name);
  \Drupal::cache('data')
    ->delete('tmgmt_language_pairs:' . $this->name);
  \Drupal::cache('data')
    ->delete('tmgmt_remote_languages:' . $this->name);
}