<?php
declare(strict_types=1);

namespace Autogedal\BlackFriday\Model\Config\Backend;

/**
 * Settings the site-wide teasers depend on (page on/off, dates, teaser options): besides the landing page, all the
 * pages carrying the teaser are dropped from the full page cache when the value changes.
 */
class TeaserCacheCleaning extends CacheCleaning
{
    public function afterSave()
    {
        if ($this->isValueChanged()) {
            $this->cacheCleaner->cleanTeaser();
        }
        return parent::afterSave();
    }
}
