I am using the Sitemap plugin
Plugins.Add(new SitemapFeature …
It is generating my sitemap correctly
The sitemap seems to be cached until the application is restarted. Is this correct, I cannot figure out where this would happen / if there is a way to force the sitemap to be regenerated
It’s not that the SitemapFeature itself is cached (it just iterating over .NET collections), but it’s typically only populated once on Startup which is why you’d only see it repopulated when the AppDoman restarts.
To have it “refresh” you’d need to re-populate the collections, e.g. in a periodically pinged Service with something like:
var sitemap = HostContext.GetPlugin<SitemapFeature>();
sitemap.UrlSet = ...;