On this page.... RSS 2.0 | Atom 1.0 | CDF
# Monday, 23 October 2006

I just spent an hour or more that I DON'T HAVE debugging a mysterious caching issue.  I suppose in some cases it might be obvious, but in this one, it was not.  To sum up, we're using an XmlDataSource control generically and setting its Data property programmatically (and using an XSL--don't know if that matters). 

Anyways, apparently the dang control defaults to "cache indefinitely" and won't refresh until the file it depends on changes.  I guess the thing is that it doesn't look for changes when you set the Data property, so it caches indefinitely to be sure.  Set EnableCaching to false, and voila, the problem is solved.

This just highlights a rule that all general APIs should follow--don't do any automatic caching.  You can't account for all the ways your customers will use your stuff, so just don't do it.  It's not hard to make them flip a bit to turn it on. 

Argh!

Monday, 23 October 2006 22:39:43 (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [1]  | 
Saturday, 28 October 2006 23:37:59 (Eastern Daylight Time, UTC-04:00)
That one kicked my but too during the beta - I reported it and I got the By Design - By Design I wanted it to work like the other Data Sources !

http://blog.davidyack.com/archive/2005/06/28/2213.aspx
Comments are closed.

Disclaimer
The opinions expressed herein are solely my own personal opinions, founded or unfounded, rational or not, and you can quote me on that.

Thanks to the good folks at dasBlog!

Copyright © 2017 J. Ambrose Little