SiteMapProvider - Menu items in cache RRS feed

  • Question

  • Hello all,


    I've created a SiteMapProvider that read the items from a list to populate the Quick Launch Menu.

    Its working fine but every time I add a new item to my list I need to reset the IIS in order to clean the server cache and then make the new item appear in the menu. Is there a way to programmatically clean the cache?

    It's absolutely not practical to reset the IIS every time I create a new item.





    Wednesday, April 16, 2008 7:44 PM

All replies

  • read the cache from HTTPRunTime.Cache object and remove the one which you need to. this will referesh the cache.


    Wednesday, April 16, 2008 7:58 PM
  • I would store the last modified date of the list in the cache and check against that to determine if you should update your SiteMapProvider cache.

    Wednesday, April 16, 2008 8:21 PM
  • The thing is that I'm not the one that manipulates the cache..

    I think SharePoint controls the Menu Cache by itselft so I need somehow to clean that.

    Wednesday, April 16, 2008 8:31 PM
  • as i said display all items from HTTPRunTime.Cache

     object and see which one is related to your required object. it be easily found by printing all of them. and you can print them in a layout application page and print them after IIS Reset so that you can see that there was no object after IISReset and once you hit your navigation page, you will some cache objects.

    Wednesday, April 16, 2008 8:38 PM
  • I checked the HttpRuntime Cache and theres nothing there, so I think there must be something other else than the Cache, you guys have any idea what could it be? I mean, I need to reset de IIS to make the items appear, it's not anything releated to garbage cuz recycling the app pool doesn't work, stopping the Web Application and restart it doesn't work either.


    Thursday, April 17, 2008 2:15 PM
  • Have you found the solution for it? I run into the sample problem and would like to find some solution

    Tuesday, September 2, 2008 4:47 AM
  • No, unfortunately I haven't found anything.. Now I'm not even looking for a solution to it... anyways, if you find something let me know.

    Monday, September 22, 2008 8:53 PM
  • I happened to get the same issue. The root cause I guess is that W3WP instantiate a single instance of SiteMapProvider you customize, so, if you cache the menu data to render when the SiteMapProvider instantiate, you need to refresh the data periodically even if its the same instance of SiteMapProvider.

    you can scan the QR of my Logo to follow my WeChat public account and contact me if you have any interest in my development

    Friday, October 4, 2019 2:20 AM