<?php declare(strict_types=1);
namespace Flink\FriendlyGreeting;
use Shopware\Core\Framework\Adapter\Cache\CacheClearer;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\ActivateContext;
class FlinkFriendlyGreeting extends Plugin
{
/**
* @var CacheClearer
*/
public $cacheClearer = null;
public function setCacheClearer(CacheClearer $cacheClearer)
{
$this->cacheClearer = $cacheClearer;
}
public function activate(ActivateContext $activateContext): void
{
parent::activate($activateContext);
try {
$this->cacheClearer->clear();
} catch (\Exception $e) {
// Clear failed
}
}
}