Hi All, 

Below is the code which is being used for reading a RSS feed from a 
Wordpress(WP) site running Wordpress 3.9.1 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
<cftry> 
<cfset rssUrl = "http://www.testsite.com/?feed=rss2";>;            
<cfcache action = "cache" timespan = "#createtimespan(0,0,2,0)#">
          <cffeed action="read" source="#rssUrl#" query="entriesNews" 
properties="info" timeout = "180">       
          <ul>                          
          <cfoutput query="entriesNews" startrow="1" maxrows="3">               
                                                 <cfset tempTextNews = #title#> 
                            
          <cfif len(tempTextNews) gt '75'> 
            <li><a class="NewsEvents" href="#rssLink#" 
target="_blank">#Left(tempTextNews, 75)#...more</a></li> 
          <cfelse> 
          <li>
          <a class="NewsEvents" href="#rssLink#" 
target="_blank">#title#...more</a>
          </li>
         </cfif>
         </cfoutput>
</cfcache>
 <cfcatch type="any">
 <!--                            <cfdump var="#entriesNews#"> ---> 
 <!--                            <cfdump var="#info#"> --->                     
                       
 
 News Feed Temporarily Unavailable                   
 </cfcatch>                     </ul>   
 
 </cftry> 
 
 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 

For Application Server Caching, we have Cache Template in Request and Save 
Class Files enabled. Since lot of files are in ColdFusion, 
Trusted Cache is disabled.
 
 I added a basic cache so that the server running ColdFusion 9 reaches out to 
the server hosting Wordpress site every 2 minutes
 
 1. If 10(or 1000) people visit the webpage in an hour, where the above code 
exists, will it connect to the server hosting Wordpress site every 2 minutes 
for the RSS feed? 
 
 2. Or, will it be sooner if the RSS feed on WordPress changes between the 2 
minute interval?
 
Thanks 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359362
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to