Hi

I have the following CFHTTP tag script, how do I check that it is
caching this data correctly into the Application scope of the server, so
the CFHTTP tag does not need to go out to the Internet within the 500
minute timeframe set?  

This is my Application.cfm page

----
<CFAPPLICATION NAME="application">

<cfif 
        not structKeyExists(Application, "TimeStamp") 
                or 
        (dateDiff("n", Application.TimeStamp, now()) gt 500)> 

        <cfset Application.TimeStamp = now() />

 <cfhttp url="http://feeds.bbc.co.uk/weather/feeds/rss/5day/id/3314.xml";
method="GET" resolveurl="No"></cfhttp>
        <cfset Application.weather_xml = xmlParse(cfhttp.FileContent) />

</cfif>

-------------

This is the code to output the feed.

<cfoutput>
<img src="#application.weather_xml.rss.channel.image.url.xmlText#"
alt="#application.weather_xml.rss.channel.item.DESCRIPTION.xmlText#"
width="70px" height="70px">

<br>

<cfloop index="x" from="1"
to="#ArrayLen(application.weather_xml.rss.channel.item)#">

#replace(application.weather_xml.rss.channel.item[x].title.xmlText, ',',
'<br>', 'ALL')#

</cfloop>
</cfoutput>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296222
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to