diff --git a/Internal/Framework/Templating/Cache/ShopTemplateCacheServiceBridge.php b/Internal/Framework/Templating/Cache/ShopTemplateCacheServiceBridge.php new file mode 100644 index 0000000..1a4a6eb --- /dev/null +++ b/Internal/Framework/Templating/Cache/ShopTemplateCacheServiceBridge.php @@ -0,0 +1,42 @@ + + * @link https://www.oxidmodule.com + */ + +declare(strict_types=1); + +namespace D3\OxidServiceBridges\Internal\Framework\Templating\Cache; + +use OxidEsales\EshopCommunity\Internal\Framework\Templating\Cache\ShopTemplateCacheServiceInterface; + +class ShopTemplateCacheServiceBridge implements ShopTemplateCacheServiceBridgeInterface +{ + /** + * @var $shopTemplateCacheService + */ + private ShopTemplateCacheServiceInterface $shopTemplateCacheService; + + public function __construct( + ShopTemplateCacheServiceInterface $shopTemplateCacheService + ) { + $this->shopTemplateCacheService = $shopTemplateCacheService; + } + + /** + * @param int $shopId + * + * @return void + */ + public function invalidateCache(int $shopId): void + { + $this->shopTemplateCacheService->invalidateCache( $shopId); + } +} \ No newline at end of file diff --git a/Internal/Framework/Templating/Cache/ShopTemplateCacheServiceBridgeInterface.php b/Internal/Framework/Templating/Cache/ShopTemplateCacheServiceBridgeInterface.php new file mode 100644 index 0000000..2a3a9f5 --- /dev/null +++ b/Internal/Framework/Templating/Cache/ShopTemplateCacheServiceBridgeInterface.php @@ -0,0 +1,26 @@ + + * @link https://www.oxidmodule.com + */ + +declare(strict_types=1); + +namespace D3\OxidServiceBridges\Internal\Framework\Templating\Cache; + +interface ShopTemplateCacheServiceBridgeInterface +{ + /** + * @param int $shopId + * + * @return void + */ + public function invalidateCache(int $shopId): void; +} \ No newline at end of file diff --git a/services.yaml b/services.yaml index 9153175..b1a9055 100644 --- a/services.yaml +++ b/services.yaml @@ -5,3 +5,6 @@ services: D3\OxidServiceBridges\Internal\Framework\Module\Path\ModulePathResolverBridgeInterface: class: D3\OxidServiceBridges\Internal\Framework\Module\Path\ModulePathResolverBridge + + D3\OxidServiceBridges\Internal\Framework\Templating\Cache\ShopTemplateCacheServiceBridgeInterface: + class: D3\OxidServiceBridges\Internal\Framework\Templating\Cache\ShopTemplateCacheServiceBridge