From c6416d068718a23dc137263225c734252e5ce5d0 Mon Sep 17 00:00:00 2001 From: kGablo Date: Thu, 20 Jun 2024 14:53:36 +0200 Subject: [PATCH] cache key fix --- Model/ApiFacade/OpenApi.php | 2 +- Model/ApiFacade/Transaction/TransactionApiFacade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/ApiFacade/OpenApi.php b/Model/ApiFacade/OpenApi.php index 26978d3..35395b0 100755 --- a/Model/ApiFacade/OpenApi.php +++ b/Model/ApiFacade/OpenApi.php @@ -27,7 +27,7 @@ public function __construct(TpayConfigInterface $tpay, CacheInterface $cache) } $this->tpayApi->transactions()->setClientName($tpay->buildMagentoInfo()); if (!$token) { - $this->cache->save(serialize($this->tpayApi->getToken()), $this->getAuthTokenCacheKey($tpay)); + $this->cache->save(serialize($this->tpayApi->getToken()), $this->getAuthTokenCacheKey($tpay), [\Magento\Framework\App\Config::CACHE_TAG], 7100); } } diff --git a/Model/ApiFacade/Transaction/TransactionApiFacade.php b/Model/ApiFacade/Transaction/TransactionApiFacade.php index 1c7759e..7a9b766 100755 --- a/Model/ApiFacade/Transaction/TransactionApiFacade.php +++ b/Model/ApiFacade/Transaction/TransactionApiFacade.php @@ -86,7 +86,7 @@ public function channels(): array return true === $channel->available; }); - $this->cache->save(serialize($channels), $cacheKey, [], self::CACHE_LIFETIME); + $this->cache->save(serialize($channels), $cacheKey, [\Magento\Framework\App\Config::CACHE_TAG], self::CACHE_LIFETIME); return $channels; }