Skip to main content
Inspiring
November 12, 2009
Question

RSS feed not updating after initial load

  • November 12, 2009
  • 2 replies
  • 481 views

Various readers loads my rss feed properly, but only on the first load. If I update that feed the reader still displays the previously fetched content (without the updates). I've checked the .xml file numerous times and it contains the most up-to-date content, the reader is just not displaying it. Any thoughts?

<cfquery name="myQuery" datasource="mySource">
SELECT *
FROM myTable
</cfquery>

<cfset columnMapStruct = StructNew()>
<cfset columnMapStruct.content = "SUBJECT">
<cfset columnMapStruct.title = "SUBJECT">
<cfset columnMapStruct.rsslink = "URL">

<cfset meta.title = "Test Title">
<cfset meta.link = "http://mysite.com">
<cfset meta.description = "News items for my site">
<cfset meta.version = "rss_2.0">

<cffeed action="create"
    query="#myQuery#"
    properties="#meta#"
    columnMap="#columnMapStruct#"
    xmlvar="rssXML"
    outputFile = "feed.xml"

    overwrite = "yes"
     >

This topic has been closed for replies.

2 replies

Inspiring
November 15, 2009

You might need to set an HTTP header to tell the browser not to cache the feed XML?  When you rebrowse to the feed URL are you getting a 200/OK or a 304/Not modified?  Sorry, would normall test this sort of thing before suggesting things but am flat out with work @ present.

--

Adam

BKBK
Community Expert
Community Expert
November 15, 2009

If the database table is updated, then the page containing the cffeed tag will have to be refreshed, too.