I recommend storing the feed content once it's retrieved.  It's just
polite.  Many feeds provide a TTL value (that's the RSS terminology)
that tells you how often they may update the sight.  If it's 45, for
example, don't hit their server more often than that.  It spares their
server some load.  You can also use the last modified and etag
response headers to determine whether anything has actually changed
and only retrieve the feed if there is new data.

On 8/24/06, Ian Vaughan <[EMAIL PROTECTED]> wrote:
> How would I cache these xml feed requests, so it does not need to make a
> request every time the page is called ?
>
> I have tried using
>
> <cfcache action="cache" timespan="#createTimeSpan(0,0,20,0)#">
>
> But as the page is using a user login system i.e.
>
> <CFIF IsDefined("Session.username") AND IsDefined("Session.Password")
> AND IsDefined("Session.ID")>
>
> --- page code ---
>
> <CFELSE>
> <!--- If the session is not active then the user is directed to the
> login page --->
> <CFLOCATION URL="../login.cfm" ADDTOKEN="No">
> </CFIF>
>
> The page will not load, I am not getting any error, the page is
> redirecting back to the login screen?
>
> Could it be to do with the cfcache not liking the session variables??
>
> -----Original Message-----
> From: Rob Wilkerson [mailto:[EMAIL PROTECTED]
> Sent: 23 August 2006 17:23
> To: CF-Talk
> Subject: Re: Parsing an XML Feed
>
> Yep.  Both work just fine for me.  One other thing to look for...if
> you're using a DevNet version of ColdFusion then it may be inserting an
> errant <meta> tag that causes all kinds of havoc when dealing with XML.
>
> On 8/23/06, Ian Vaughan <[EMAIL PROTECTED]> wrote:
> > Hi Rob
> >
> > How about these feeds, do you get these to work for you ?
> >
> > http://www.vnunet.com/feeds/rss/latest/all/analysis
> >
> > http://www.vnunet.com/feeds/rss/computing
> >
> > I am getting the error
> >
> > An error occured while Parsing an XML document.
> > Content is not allowed in prolog.
> >
> >
> >
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250842
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