What is the best cache duration value?

Aug 27, 2010 at 7:56 AM
Edited Aug 27, 2010 at 11:08 AM

If I set my cache duration to 0 I can no longer set the sitemap.currentnode. If I set it to any other value the current node is randomly null throwing an exception. Restarting the application fixes the problem for a while and then it occurs again.

What is the best cache duration value and why does it die when the cache expires?

Coordinator
Aug 27, 2010 at 10:40 AM

This relates to http://mvcsitemap.codeplex.com/workitem/4923, we are working on it.

Aug 27, 2010 at 11:09 AM

Thanks Maarten. Is there a workaround for the time being? I have a project going live on Wednesday and this is a bit of a show-stopper.

Coordinator
Aug 27, 2010 at 12:42 PM

Best is to enable caching. Both for stability and performance reasons --> generating the sitemap on every request can really hog down your server.

Aug 27, 2010 at 1:08 PM
Edited Aug 27, 2010 at 1:09 PM

Performance reasons I understand but right now there is little stability when caching is enabled.

Does the problem occur if the sitemap isn't created by scanning the assemblies (i.e. if I just use a sitemap file)? Would that be a temporary fix?