I'm running an async thread with the use of Task.Factory.StartNew(() to generate sitemaps. My problem is that when I call my method:
Task.Factory.StartNew(() => generator.CreateSiteMapForSite
it builds the sitemaps every time.
In my method I check that it only needs to regenerate the files if it is older than one hour. Even though it still regenerate the files per each request, is there a way to handle this in a async thread ?