maartenba / MvcSiteMapProvider

An ASP.NET MVC SiteMapProvider implementation for the ASP.NET MVC framework.
Microsoft Public License
537 stars 220 forks source link

PreservedRouteParameters and caching #472

Open rhousham opened 6 years ago

rhousham commented 6 years ago

Hi I've developed a small site and really just use your sitemap for the breadcrumbs in each site page. I don't use the sitemap.xml for crawling.

The Mvc.SiteMap is quite small 141 lines (with a few spaces). There are quite a few pages given that most of them are driven by the database but the sitemap itself is quite small.

I'm just trying to wrangle my head around the bug here - which has come up once or twice. https://github.com/maartenba/MvcSiteMapProvider/issues/424 and the config options.

I've only just looked into them and set these up

    <add key="MvcSiteMapProvider_CacheDuration" value="5"/>
    <add key="MvcSiteMapProvider_EnableLocalization" value="false"/>
    <add key="MvcSiteMapProvider_EnableSitemapsXml" value="false"/>

I'm using a code first methodology and the 'web publishing' so I could change that cache duration to something massive, given that it won't need to change. Apart from when I perhaps release a new version.

I've also turned off the sitemaps xml - will this solve the 424 bug?

Just trying to solve this the best way I know how without resorting to an external DI (which will probably take a load more time).

rhousham commented 6 years ago

Did this and haven't had the error yet - so maybe looking good. Richard