From b9ff50f356df61db46c3a4314977a8c02c39c51a Mon Sep 17 00:00:00 2001 From: "joeri.lock" Date: Wed, 6 Jan 2021 09:26:33 +0100 Subject: [PATCH 1/2] Bugfix: Add localecode to cache_indentifier --- Service/Mollie/GetIssuers.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Service/Mollie/GetIssuers.php b/Service/Mollie/GetIssuers.php index b5281464f6f..58febff3b59 100644 --- a/Service/Mollie/GetIssuers.php +++ b/Service/Mollie/GetIssuers.php @@ -8,6 +8,7 @@ use Magento\Framework\App\CacheInterface; use Magento\Framework\Serialize\SerializerInterface; +use Magento\Framework\Locale\Resolver; use Mollie\Api\MollieApiClient; use Mollie\Payment\Model\Mollie as MollieModel; @@ -33,11 +34,13 @@ class GetIssuers public function __construct( CacheInterface $cache, SerializerInterface $serializer, - MollieModel $mollieModel + MollieModel $mollieModel, + Resolver $resolver ) { $this->cache = $cache; $this->serializer = $serializer; $this->mollieModel = $mollieModel; + $this->resolver = $resolver; } /** @@ -48,7 +51,7 @@ public function __construct( */ public function execute(MollieApiClient $mollieApi, $method, $type) { - $identifier = static::CACHE_IDENTIFIER_PREFIX . $method . $type; + $identifier = static::CACHE_IDENTIFIER_PREFIX . $method . $type . $this->resolver->getLocale(); $result = $this->cache->load($identifier); if ($result) { return $this->serializer->unserialize($result); From 15ba5393f971b8c54dcca7d09d54a7bac826d47d Mon Sep 17 00:00:00 2001 From: "joeri.lock" Date: Wed, 6 Jan 2021 09:47:18 +0100 Subject: [PATCH 2/2] + define Resolver property --- Service/Mollie/GetIssuers.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Service/Mollie/GetIssuers.php b/Service/Mollie/GetIssuers.php index 58febff3b59..e2ae2489ab7 100644 --- a/Service/Mollie/GetIssuers.php +++ b/Service/Mollie/GetIssuers.php @@ -31,6 +31,11 @@ class GetIssuers */ private $mollieModel; + /** + * @var Resolver + */ + private $resolver; + public function __construct( CacheInterface $cache, SerializerInterface $serializer,