XML Caching in Classic ASP on IIS 6.0

T

TechNeck

We have a website that reads data from Oracle and creates an XML file. Then
the site uses that file to access the info faster. On IIS5 we have no
problems, but on IIS6 we seem to have some caching issuses. This deals with
the Worker Processes. By default, there is only 1 Worker Process that gets
recycled after 1700 minutes or so. The problem is, that we will select some
data from the screen, which opens up another window to update the info. We
walk through the update process and change some data and it updates the page
fine. We can even check the XML file and it is changed, but if you choose to
go back into that data, the dropdowns will reflect whatever was initially in
the XML not the changes. If I increase the number of Worker Processes and
shorten their recycle time, this doesn't seem to be a problem, but for every
request I am generating a 25M file on the server that eventually gets
recycled. I don't want to load up the memory with useless files, but I want
our application to reflect the correct data. I really need to do this without
affecting any other possible web apps that may be on the box. Any advice?
 
A

Anthony Jones

It's unclear from your post whether the file is being sent to the client or
is held only by the server to help build pages it supplies to the client.

It does sound like there is either a change in what the browser believes it
can re-use from the local cache or there is something that IIS 6 believes is
static content that Http.sys is serving itself from a cache it maintains.

If using IE6 have you tried Ctrl+F5, does that get fresh data OR if another
client visits the affected page do they see out-of-date information?

Anthony.
 
T

TechNeck

The file is actually being sent to the client and is stored in the temporary
Internet Files. I tried using Ctrl+F5 but I got the same results.

The initial web page launches another window which then cycles through 5
different windows loading data from the XML file each time. On the first pass
everything works great, but on the second and subsequent passes, I see the
same exact data as the first time I made the changes.

Any recommendations?

Jared
 
A

Anthony Jones

If you navigate to the XML file directly in the browser does the xml file
retrieved show old or new data?

If not, what happens if you Ctrl+F5 now, is is updated?
 
T

TechNeck

OK, I went into the app, changed an item, then went back in and it was still
defaulting to the original. So I changed the URL to point to the XML file on
the server where it wrote the changes and it displays the old data. I press
Ctrl+F5 and it changes to the new data.

Jared
 
A

Anthony Jones

Then the XML file is being cached somewhere.

Have you enabled content expiration on the file and set it to expire
immediately?

XML is treated as static content.

Anthony.
 
T

TechNeck

I have enabled content expiration on all three virtual directories that it
gets information from and even did the same for the Default Web Site, but I
still get the same response.

Jared
 
A

Anthony Jones

Hmm... sounds like an IE 'optimisation' to me.

You could try this albeit a bit of a kuldge:-

Change all references to the XML file to:-

/yourPath/youFile.xml?ver=<%=Application("XMLVersion")%>

Where in your code you modify the XML file add:-

Application("XMLVersion") = Application("XMLVersion") + 1
 
M

Mark J. McGinty

TechNeck said:
I have enabled content expiration on all three virtual directories that it
gets information from and even did the same for the Default Web Site, but
I
still get the same response.

Jared

I had a similar problem, fixed with cache control headers:

Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1


-Mark




 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top