$this->themePathBuilder->
saveSeed($salesChannelId,
$themeId,
$newThemeHash);
// only delete the old directory if the `themePathBuilder` actually returned a new path and supports seeding
if ($themePrefix !==
$oldThemePrefix) { $stamps =
[];
if ($this->themeFileDeleteDelay > 0
) { // also delete with a delay, so that the old theme is still available for a while in case some CDN delivers stale content
// delay is configured in seconds, symfony expects milliseconds
$stamps[] =
new DelayStamp($this->themeFileDeleteDelay * 1000
);
} $this->messageBus->
dispatch( new Envelope( new DeleteThemeFilesMessage($oldThemePrefix,
$salesChannelId,
$themeId),
$stamps ) );
} // Reset cache buster state for improving performance in getMetadata
$this->logger->
invalidate(['theme-metaData'
], true
);
}