LocaleTranslationCacheTag::saveTranslation

public LocaleTranslationCacheTag::saveTranslation()

Invalidate cache tags whenever a string is translated.

File

core/modules/locale/src/EventSubscriber/LocaleTranslationCacheTag.php, line 34

Class

LocaleTranslationCacheTag
A subscriber invalidating cache tags when translating a string.

Namespace

Drupal\locale\EventSubscriber

Code

public function saveTranslation() {
  $this->cacheTagsInvalidator->invalidateTags(['rendered', 'locale']);
}
doc_Drupal
2016-10-29 09:24:12
Comments
Leave a Comment

Please login to continue.