From 6f9855995dd3603b622a9e601162ac0b6da9a694 Mon Sep 17 00:00:00 2001 From: Nikita Kiselev Date: Thu, 13 Nov 2025 10:47:06 +0300 Subject: [PATCH] feat: clear cache after settings update --- .../oc_telegram_shop/bastion/Services/SettingsService.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/oc_telegram_shop/upload/oc_telegram_shop/bastion/Services/SettingsService.php b/module/oc_telegram_shop/upload/oc_telegram_shop/bastion/Services/SettingsService.php index 45d52a2..96b67c7 100755 --- a/module/oc_telegram_shop/upload/oc_telegram_shop/bastion/Services/SettingsService.php +++ b/module/oc_telegram_shop/upload/oc_telegram_shop/bastion/Services/SettingsService.php @@ -2,15 +2,18 @@ namespace Bastion\Services; +use Openguru\OpenCartFramework\Cache\CacheInterface; use Openguru\OpenCartFramework\OpenCart\Decorators\OcRegistryDecorator; class SettingsService { private OcRegistryDecorator $registry; + private CacheInterface $cache; - public function __construct(OcRegistryDecorator $registry) + public function __construct(OcRegistryDecorator $registry, CacheInterface $cache) { $this->registry = $registry; + $this->cache = $cache; } public function update(array $data): void @@ -18,5 +21,7 @@ class SettingsService $this->registry->model_setting_setting->editSetting('module_telecart', [ 'module_telecart_settings' => $data, ]); + + $this->cache->clear(); } }