ListBuilder/DynamicListBuilder.php
protected function getDownloadUrl()
    {
        if (null === $this->downloadUrl) {
            $this->downloadUrl = $this->router->generate(
                'sulu_media.website.media.download',
                [
                    'slug' => 'file',
                    'id' => '{id}',
                ],
                true
            );
        }

        return $this->downloadUrl;
    }
protected function getDownloadUrl()
    {
        if (null === $this->downloadUrl) {
            $this->downloadUrl = $this->router->generate(
                'sulu_media.website.media.download',
                [
                    'slug' => 'file',
                    'id' => '{id}',
                ],
                true
            );
        }

        return $this->downloadUrl;
    }
For performance generate route only once.

@return string