diff --git a/metatag.install b/metatag.install index 0c36865..b82b1b1 100644 --- a/metatag.install +++ b/metatag.install @@ -1292,3 +1292,11 @@ function metatag_update_7021() { function metatag_update_7022() { variable_del('metatag_skip_update_7015'); } + +/** + * Clear the Metatag cache because $cid_parts was changed. + */ +function metatag_update_7023() { + cache_clear_all('*', 'cache_metatag', TRUE); + return t('All Metatag caches cleared.'); +} diff --git a/metatag.module b/metatag.module index 1092c04..cebe2c6 100644 --- a/metatag.module +++ b/metatag.module @@ -809,7 +809,10 @@ function metatag_entity_view($entity, $entity_type, $view_mode, $langcode, $forc 'bundle' => $bundle, 'entity_id' => $entity_id, 'revision_id' => $revision_id, + // Cache separately based on the language of the passed-in entity and the + // overall active language of the page. 'langcode' => $langcode, + 'language_content' => $GLOBALS['language_content']->language, 'view_mode' => $view_mode, ); $cid = metatag_cache_default_cid_parts($cid_parts);