Skip to content

Commit 85d05cc

Browse files
committed
B2B-2259: customAttributeMetadata GraphQl query has no cache identity
- attribute uniqueness is by primary key
1 parent 328d87f commit 85d05cc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/EavGraphQl/Model/Resolver/Cache/CustomAttributeMetadataIdentity.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ public function getIdentities(array $resolvedData): array
2525
foreach ($resolvedData['items'] as $item) {
2626
if (is_array($item)) {
2727
$identities[] = sprintf(
28-
"%s_%s",
28+
"%s_%s_%s",
2929
EavAttribute::CACHE_TAG,
30+
$item['entity_type'],
3031
$item['attribute_code']
3132
);
3233
}

app/code/Magento/EavGraphQl/Plugin/Eav/AttributePlugin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ public function afterGetIdentities(Attribute $subject, array $result): array
2828
$result,
2929
[
3030
sprintf(
31-
"%s_%s",
31+
"%s_%s_%s",
3232
Attribute::CACHE_TAG,
33+
$subject->getEntityType()->getEntityTypeCode(),
3334
$subject->getAttributeCode()
3435
)
3536
]

0 commit comments

Comments
 (0)