"Mahmoud Al-Qudsi" <mq****@gmail.comwrote in message
news:e1**********************************@y21g2000 hsf.googlegroups.com...
Is there any way to stop an XmlDocument object from using data grabbed
from a previous request?
e.g. if I used XmlDocument.Load to grab a URI, and I know that this
URI changes often (for example, an RSS feed) can I somehow tell the
framework to not use cached data?
Will I have to create a custom HttpWebRequest and convert the data to
an XmlDocument for processing or is there some way to tell XmlDocument
(perhaps via the XmlResolver somehow?) to never use the cache?
The Load method honors the WebRequest Caching policy which by default is set
to bypass the cache. However its worth noting that this actually means
bypass the local cache it does not add a pragma: no-cache header to the
request and therefore other caches such as a proxy server between the client
and the origin server may serve content from a cache.
You will need to use HttpWebRequest if the default behaviour (or your
prevailing settings set via the requestCaching element in the .config(s)) is
not want you need.
I suggest you use a policy created wth Revalidate level.
--
Anthony Jones - MVP ASP/ASP.NET