开发者

Silverlight 4 caching issue?

I am currently experienc开发者_开发技巧ing a weird caching problem it would seem. When I load my data intially, I return all the data within given dates and my graph looks as follows:

Silverlight 4 caching issue?

Then I filter the data to return a subset of the original data for the same date range (not that it matters) and I get the following view of my data:

Silverlight 4 caching issue?

However, I intermittently get the following when I refresh the same filterd view of the data:

Silverlight 4 caching issue?

One can see that not all the data gets cached but only some of it i.e. for 12 Dec 2010 and 5 dec 2010(not shown here). I've looked at my queries and the correct data is getting pulled out. It is only on the presentation layer i.e. on Mainpage.xaml.cs that this erroneous data seems to exist.

I've stepped through the code and the data is corect through all the layers except on the presentation layer. Has anyone experienced this before? Is there some sort of caching going in the background that is keeping that data in the background as I've got browser caching off?

I am using the LoadOperation in the callback method within the Load method of the DomainContext if that helps...


I think I've resolved it and so far so good. The actual data that we need doesn't have a unique attribute for each row returned. Hence, what we ended up doing was using sql row_number() to have what we thought would be a consistent unique id. However, that's not the case and hence we get these issues although it doesn't entirely explain why the same 2 pieces of data were consistently being returned.

Anyway, what I ended up doing was to append a random number to the returned "unique" id and that did the trick.


Yes I've seen this bug before but I haven't managed to properly track down the cause in the toolkit source code. It seems under certain conditions a chart series fails to remove all the visual elements of an existing series so orphans some of them. The result is this "afterimage" of data points which simply won't go away.

I don't really have a concrete work around for the issue. One possibility since you are making changes in a callback method is use Dispatcher.BeginInvoke to move any collection changes to the UI Thread.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜