public function invalidateCountryRoute(EntityWrittenContainerEvent
$event): void
{ // invalidates the country route when a country changed or an assignment between the sales channel and country changed
$this->cacheInvalidator->
invalidate([...
$this->
getChangedCountryAssignments($event), ...
$this->
getChangedCountries($event)]);
} public function invalidateCountryStateRoute(EntityWrittenContainerEvent
$event): void
{ $tags =
[];
if ( $event->
getDeletedPrimaryKeys(CountryStateDefinition::ENTITY_NAME
) ||
$event->
getPrimaryKeysWithPropertyChange(CountryStateDefinition::ENTITY_NAME,
['countryId'
]) ) { $tags[] = CachedCountryStateRoute::ALL_TAG;
} if (empty($tags)) { // invalidates the country-state route when a state changed or an assignment between the state and country changed
/** @var list<string> $tags */
$tags =
array_map( [CachedCountryStateRoute::
class, 'buildName'
],
$event->
getPrimaryKeys(CountryDefinition::ENTITY_NAME
) );