On this page.... RSS 2.0 | Atom 1.0 | CDF
# Monday, October 23, 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. 


Monday, October 23, 2006 10:39:43 PM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [1]  | 
Saturday, October 28, 2006 11:37:59 PM (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 !

Comments are closed.

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 © 2020 J. Ambrose Little