Skip to content

Commit 3ed8963

Browse files
committed
ACP2E-3063: [Cloud] Cache is not getting invalidated.
- without test
1 parent 03473e6 commit 3ed8963

File tree

3 files changed

+13
-40
lines changed

3 files changed

+13
-40
lines changed

app/code/Magento/Cms/Model/TagsStrategy.php

Lines changed: 0 additions & 31 deletions
This file was deleted.

app/code/Magento/Cms/Observer/InvalidateLayoutCacheObserver.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,20 @@ public function execute(Observer $observer)
8686
$tags = $this->tagResolver->getTags($object);
8787

8888
if (!empty($tags)) {
89+
$tags[] = $this->getAdditionalTags($object);
8990
$this->layoutCache->clean(\Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, $tags);
9091
}
9192
}
93+
94+
/**
95+
* Get additional tags
96+
*/
97+
public function getAdditionalTags($object): string
98+
{
99+
return sprintf(
100+
'%s_%s',
101+
'CMS_PAGE_VIEW_ID',
102+
str_replace('-', '_', strtoupper($object->getIdentifier()))
103+
);
104+
}
92105
}

app/code/Magento/Cms/etc/di.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,4 @@
316316
</argument>
317317
</arguments>
318318
</virtualType>
319-
<type name="Magento\Framework\App\Cache\Tag\Strategy\Factory">
320-
<arguments>
321-
<argument name="customStrategies" xsi:type="array">
322-
<item name="Magento\Cms\Model\Page" xsi:type="object">
323-
Magento\Cms\Model\TagsStrategy
324-
</item>
325-
</argument>
326-
</arguments>
327-
</type>
328319
</config>

0 commit comments

Comments
 (0)