protected function clearLocation($locationId)
{
$locationCache = $this->cache->getItem('urlAlias', 'location', $locationId);
if ($locationCache->isMiss()) {
// we need to clear all if we don't have location id in cache
$this->cache->clear('urlAlias');
} else {
$urlAliasIds = $locationCache->get();
foreach ((array) $urlAliasIds as $urlAliasId) {
$this->cache->clear('urlAlias', $urlAliasId);
}
$this->cache->clear('urlAlias', 'url');
$locationCache->clear();
}
}