Skip to content

Commit 03473e6

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

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public function getTags($object)
2222
return [
2323
sprintf('%s_%s', Page::CACHE_TAG, $object->getId()),
2424
sprintf(
25-
'%s_%s', 'CMS_PAGE_VIEW_ID',
25+
'%s_%s',
26+
'CMS_PAGE_VIEW_ID',
2627
str_replace('-', '_', strtoupper($object->getIdentifier()))
2728
)
2829
];

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
namespace Magento\Cms\Observer;
2020

21+
use Magento\Cms\Model\Page;
2122
use Magento\Framework\App\Cache\Type\Layout as LayoutCache;
2223
use Magento\Framework\App\Cache\StateInterface as CacheState;
2324
use Magento\Framework\App\Cache\Tag\Resolver;
@@ -74,6 +75,10 @@ public function execute(Observer $observer)
7475
return;
7576
}
7677

78+
if (!$object->dataHasChangedFor(Page::PAGE_LAYOUT)) {
79+
return;
80+
}
81+
7782
if (!$this->cacheState->isEnabled(LayoutCache::TYPE_IDENTIFIER)) {
7883
return;
7984
}

0 commit comments

Comments
 (0)