Domocha’s Weblog


Caching on XmlDataSource
November 21, 2008, 7:53 am
Filed under: Uncategorized

Environment: ASP.NET (Framework 2.0)

For you who will use XmlDataSource as a datasource for data-bound web control , here’s the tips, so you won’t waste your time for such trivial problem (just like me T_T) which is caching:

  • Just remember that this DataSource control enable caching as its default value, since performance related purpose. But if the Data is likely to change at runtime, you better disable the caching, or you’ll get problem with it. It is because XmlDataSource not automatically invalidate the cache if you change the Data, as the result, the Data won’t change.
  • How to do this, simply:

YourXmlDataSourceControl.EnableCaching = false;

or

<asp:XmlDataSource EnableCaching=”False”…

that’s it ^_^


4 Comments so far
Leave a comment

Well, I’ve been trough this one :) and looking for the solutions why my XMLDS cannot reload my updates :)

Weird Cache :|

Comment by Eru

[...] pertamanya tidak ada korelasi sama sekali dengan mainan. Atau mungkin anak jaman sekarang mainannya XmlDataSource ya? ah ternyata jaman sudah begitu [...]

Pingback by Blog Review : Domocha « Intersection of Yesterday and Tomorrow

never experienced that problem since i don’t use it as my data source but its good to know it (maybe MSF will implement it someday :) )

Dang, i should make the review in english

Comment by TamaGO

Oh my god… finally you launch this blog…

Nice post by the way, even though i haven’t deal with this stuff… but thanx by the way…

Comment by sentinelcore




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s



Follow

Get every new post delivered to your Inbox.