• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/service.php
  • Класс: BitrixSeoService
  • Вызов: Service::clearClientsCache
static function clearClientsCache($engine = null, $clientId = null)
{
	$cache = Application::getInstance()->getManagedCache();
	$cache->Clean(static::CLIENT_LIST_CACHE_ID);
	$cache->Clean(static::SERVICE_AUTH_CACHE_ID);
	$cache->Clean(static::SERVICE_AUTH_CACHE_ID_ERROR);

	[$group, $type] = explode('.', $engine, 2);

	if ($group == BitrixSeoRetargetingService::GROUP)
	{
		$service = AdsAudience::getService();
		$service->setClientId($clientId);
		$account = $service->getAccount($type);
		if ($account)
			$account->clearCache();
	}

	static::$clientList = null;
	static::$auth = null;
}