I've been working with Michael on the same project and a new issue came up with this, now that the site is live and in a load balanced environment. We have 2 load balanced IIS servers, pointing at the same database.
After the fix that you provided to Michael above, when a user creates a new page or deletes a page, the customsitemap cache is refreshed and the user sees the new page in the controls which use that provider, as expected.
Now the problem is that a different user connected to the site and did not see the new changes until over 24 hours later. I think that this second user must have connected to the other load balanced server, which could have been looking at the old cache.
In our web.config, we have <cachedependency mode="InDatabase">
as suggested in the thread http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-bbtttd.aspx. So I'm not even sure why the cache refresh is not reflected on both servers at the same time - since they are both pointing to the same database.
Is there a setting somewhere that controls when this cache expires for a server?
Or is there a way to force clearing of the cache for all applications on certain events? If not, can you suggest a workaround for this problem?
Thank you again,