} if ($this->dcc_applies->for_country_currency()) { $expiration = 3 * HOUR_IN_SECONDS; } else { $expiration = MONTH_IN_SECONDS; } $this->cache->set(self::DCC_STATUS_CACHE_KEY, self::SETTINGS_VALUE_DISABLED, $expiration); return \false; } /** {@inheritDoc} */ protected function clear_state(?Settings $settings = null): void { if (null === $settings) { $settings = $this->settings; } if ($settings->has(self::SETTINGS_KEY)) { $settings->set(self::SETTINGS_KEY, self::SETTINGS_VALUE_UNDEFINED); $settings->persist(); } $this->cache->delete(self::DCC_STATUS_CACHE_KEY); } }