CFHTTP maybe caching results, how can I test and rectify ?

I have 2 x webservers, 1 running CF 10 and the other running CF 7.
I have created a small test file on the CF10 server which checks DB connectivity and on a positive result will output 'OK' to the browser. Upon failuere it will output 'DOWN' to the browser.
Testing this in multiple browsers on workstations works fine.

On the CF7 server I have a page that uses CFHTTP to check the output of the testfile on the CF10 server, ifit results with an 'OK' then no problems however if it outputs a 'DOWN' it will send an email notifying me.

Should I disable the test file on my CF10 server and check that the file returns an error in my browser my CF7 server still reports that it outputs 'OK' thus not sending me an email.

Can anybody shed any light on what is happening here, it sounds like my CF7 server is caching CFHTTP results ?

Who is Participating?
>  however CFHTTP did not show these results.

After adding the timestamp? Hm... it doesn't send an email or show the newly added timestamp in your logs that does sound like something is being cached somehow.  Meantime if I can find a CF7 instance I'll try it w/CF10 just to see if I get the same results.

    > if all is fine will award you the points

EDIT BTW, the thought's appreciated :) but don't feel obligated to accept my responses because I didn't actually provide a "solution". Though my testing happens to turn up a conclusive answer I'll certainly post it.
Silly question, but are you sure it's not just your *browser* caching the page. Browsers like Internet explorer lo-oo-ve to cache.  I've actually run a script, stopped the CF server, and refreshed the page and IE still displays the last "good" page instead of a "server not available error". Due to caching of course.
Martyn9098Author Commented:
My various browsers on various workstations update within a couple of seconds however CFHTTP continues to return the same result. Even the browser (ie) on the server updates within a few seconds also. It's only the result from CFHTTP that does not update.

Thanks for the response though.
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Have the cfhttp call send you an email with a dump of #cfhttp# so you can check for anything unusual. Also confirm that cfhttp really is caching something, put a timestamp on the page you're calling

ie     DB Test results <cfoutput>#now()#</cfoutput>  (OKAY or ERROR)

Then on your CF7 server write the results to a log file. See if you see the same timestamp multiple times. (Create a separate test file if needed)

Unfortunately I've never heard of anything other than maybe DNS caching. So I'm out of ideas, sorry. Best of luck though.
Martyn9098Author Commented:

Thanks for your input. I did place timestamps on the CF10 testfile however CFHTTP did not show these results.
I have restarted the CF7 server and all is now well, I'm just not sure how long this will last as it really does seem to me that there is some kind of cache and when the alotted memory for this cache is full it will return previous results irrispective of what the current results are.

I will keep testing for a week or so and if all is fine will award you the points. If the issue rises again I will continue with this post.

Thanks for your help.
Martyn9098Author Commented:

My servers are now stable. It would seem that the reboot sorted out the issue however because you you commented on my posts which gave me insights onto what to try I will award you the points.

Thanks for your input mate.

Martyn9098Author Commented:
Whilst not the answer, the input helped! Many thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.