private function getCacheTags(UrlAlias $urlAlias, array $tags = [])
    {
        $tags[] = 'urlAlias-' . $urlAlias->id;

        if ($urlAlias->type === UrlAlias::LOCATION) {
            $tags[] = 'urlAlias-location-' . $urlAlias->destination;
            $location = $this->persistenceHandler->locationHandler()->load($urlAlias->destination);
            foreach (explode('/', trim($location->pathString, '/')) as $pathId) {
                $tags[] = 'urlAlias-location-path-' . $pathId;
            }
        }

        return array_unique($tags);
    }
private function getCacheTags(UrlAlias $urlAlias, array $tags = [])
    {
        $tags[] = 'urlAlias-' . $urlAlias->id;

        if ($urlAlias->type === UrlAlias::LOCATION) {
            $tags[] = 'urlAlias-location-' . $urlAlias->destination;
            $location = $this->persistenceHandler->locationHandler()->load($urlAlias->destination);
            foreach (explode('/', trim($location->pathString, '/')) as $pathId) {
                $tags[] = 'urlAlias-location-path-' . $pathId;
            }
        }

        return array_unique($tags);
    }
private function getCacheTags ( UrlAlias $ urlAlias , array $ tags = [ ] ) { $ tags [ ] = 'urlAlias-' . $ urlAlias -> id ; if ( $ urlAlias -> type === UrlAlias :: LOCATION ) { $ tags [ ] = 'urlAlias-location-' . $ urlAlias -> destination ; $ location = $ this -> persistenceHandler -> locationHandler ( ) -> load ( $ urlAlias -> destination ) ; foreach ( explode ( '/' , trim ( $ location -> pathString , '/' ) ) as $ pathId ) { $ tags [ ] = 'urlAlias-location-path-' . $ pathId ; } } return array_unique ( $ tags ) ; }
Return relevant UrlAlias and optionally UrlAlias location tags so cache can be purged reliably.

For use when generating cache, not on invalidation.

@param \eZ\Publish\SPI\Persistence\Content\UrlAlias $urlAlias
@param array $tags Optional, can be used to specify other tags.

@return array
Return relevant UrlAlias and optionally UrlAlias location tags so cache can be purged reliably .