Skip to content
Snippets Groups Projects
Commit e52713c5 authored by Shibin Das's avatar Shibin Das
Browse files

Issue #3495392: Updating RIFT View Modes doesn't update image styles until cache is cleared

parent 76c862b7
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
namespace Drupal\rift\Plugin\Field\FieldFormatter;
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityDisplayRepositoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
......@@ -173,7 +174,10 @@ class RiftMediaEntityReferencePictureFormatter extends EntityReferenceEntityForm
'config' => $definitions[$view_mode] ?? [],
],
'#cache' => [
'tags' => $entity->getCacheTags(),
'tags' => Cache::mergeTags(
$entity->getCacheTags(),
$this->configFactory->get('rift.settings')->getCacheTags()
),
'contexts' => $entity->getCacheContexts(),
'max-age' => $entity->getCacheMaxAge(),
'keys' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment