P
PhatT
Working off of the Wicked Code article by Jeff Prosise...
http://msdn.microsoft.com/msdnmag/issues/06/02/WickedCode/default.aspx
I am trying to build my sitemap on multiple tables. I have tried this many
different ways with not the ideal results. When building the sitemap with a
storedproc that used a union query everything was working except the cache
would never invalidate. Further research led me to believe that the union's
in my storedproc would cause this. So now I have created separate sp's which
I register for the callback. The same callback function is registered for
each stored proc.
Now I get REAL inconsistent results, but sometimes the results are fine.
IOW - when I first test, it displays only the root node of the treeview
(stepping through it, I see that it builds the whole stinkin sitemap, and
then trashes it, at some point after the second call-back is registered. It
appears that the cache object is removed almost immediately after being
registered.
But then if I click on the root again, it builds all or part of the sitemap
and displays properly.
Sometimes when underlying data is updated, the sitemap refreshes, and
sometimes it doesn't. Sometimes I get partial sitemaps... etc.
Ok, this may not be making any sense, but that is because it isn't making
sense to me either. When I step through the code, it seems to hit the
buildsitemap function a random number of times (but it may be related to the
number of nodes?) and jump out because _root is not null.
Does anyone have a better understanding of how to register multiple
dependencies, or whether I might be doing something wrong - causing immediate
cache object removed for cachedependencychanged events?
Let me know if anyone wants to take a look and I will try to provide some
sensible code... 8o)
http://msdn.microsoft.com/msdnmag/issues/06/02/WickedCode/default.aspx
I am trying to build my sitemap on multiple tables. I have tried this many
different ways with not the ideal results. When building the sitemap with a
storedproc that used a union query everything was working except the cache
would never invalidate. Further research led me to believe that the union's
in my storedproc would cause this. So now I have created separate sp's which
I register for the callback. The same callback function is registered for
each stored proc.
Now I get REAL inconsistent results, but sometimes the results are fine.
IOW - when I first test, it displays only the root node of the treeview
(stepping through it, I see that it builds the whole stinkin sitemap, and
then trashes it, at some point after the second call-back is registered. It
appears that the cache object is removed almost immediately after being
registered.
But then if I click on the root again, it builds all or part of the sitemap
and displays properly.
Sometimes when underlying data is updated, the sitemap refreshes, and
sometimes it doesn't. Sometimes I get partial sitemaps... etc.
Ok, this may not be making any sense, but that is because it isn't making
sense to me either. When I step through the code, it seems to hit the
buildsitemap function a random number of times (but it may be related to the
number of nodes?) and jump out because _root is not null.
Does anyone have a better understanding of how to register multiple
dependencies, or whether I might be doing something wrong - causing immediate
cache object removed for cachedependencychanged events?
Let me know if anyone wants to take a look and I will try to provide some
sensible code... 8o)