maartenba/MvcSiteMapProvider — pull request #77 by chaoaretasty (2012-08-31 12:30:24+00:00)
Title: DefaultSiteMapProvider can't be refreshed if an exception was thrown

Currently an exception thrown while building (eg in a dynamicnodeprovider) will result in a sitemap being partially built without the cachekey being added, meaning that the refresh method won't work.

I moved the BuildSiteMap caching into the finally block. This allows exceptions to be caught and, if required by the application, for the sitemap to be refreshed.