Skip to content

Commit 2164deb

Browse files
committed
B2B-2677: [MediaGallery]Implement data caching for GraphQL results on resolver level
- Use SKU for invalidation
1 parent 5dbcdf5 commit 2164deb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/CatalogGraphQl/Plugin/Product/UpdateIdentities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(
4141
public function afterGetIdentities(Product $subject, array $result): array
4242
{
4343
if (!$subject->isObjectNew() && ($subject->isDeleted() || $this->isMediaGalleryChanged($subject))) {
44-
$result[] = sprintf('%s_%s', ResolverCacheIdentity::CACHE_TAG, $subject->getId());
44+
$result[] = sprintf('%s_%s', ResolverCacheIdentity::CACHE_TAG, $subject->getSku());
4545
}
4646
return $result;
4747
}

0 commit comments

Comments
 (0)