Groups | Blog | Home
all groups > asp.net caching > june 2005 >

asp.net caching : Caching problem...


Martin Russ
6/9/2005 9:05:03 AM
I have an asp.net application. On one of the pages is a Flash object that
polls a .xml file for data every 2 seconds or so.

The .xml file is being updated, but the contents are never updated on the
page through the flash object. I know the flash object is correctly polling.

If I stop and start the web application, the updated data is immediately
displayed.

I cannot find anywhere where this caching is taking place or can be turned
off. I've tried adding custom headers 'cache-control: no-cache' to both the
directory AND the entire website without success.

Any help would be greatly appreciated.

Thanks in advance,

CodeMeister
6/12/2005 8:48:50 PM
Have you tried Enabling the content expiration in IIS? This can be done on
the document level under the HTTP Headers tab. You can set it to expire
immediately. This has worked for me in the past.

You can also poll an .aspx page and dynamically create the xml data. This
would also solve the caching issue.

Hope this helps.

Jon


[quoted text, click to view]

Martin Russ
6/13/2005 4:31:06 AM
Thanks Jon - yes, content expiration is already set to expire immediately.

Can you explain the 'poll an aspx page and create the .xml file dymanically'
please?

Thanks,

Martin

[quoted text, click to view]
CodeMeister
6/13/2005 8:43:17 PM
Create an empty aspx page, override the Render method and output the XML to
the writer based on your data. Since the page would be dynamically recreated
on every request you would always have the most current data. You would need
to validate the performance for your request load.

You can load the data from the XML file and cache it with a file dependency.
This would allow you to reload it every time the file changes. Here's a link
on using the cache:
http://samples.gotdotnet.com/quickstart/aspplus/doc/datacaching.aspx

You may also want to look at creating a web service if Flash can parse the
SOAP message.

IHTH

Jon

[quoted text, click to view]

Martin Russ
6/20/2005 1:39:03 PM
Thanks for your help...I eventually found a hotfix for this issue, applied it
and hey presto, it works!

[quoted text, click to view]
AddThis Social Bookmark Button