<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>The Honey House Buzz - Blonde Moments</title>
			<link>http://honeyhousedesigns.com/blog/index.cfm</link>
			<description>Musings about Life, Momy-hood, Teenagers, ColdFusion, and Being a GeekGirl in the South</description>
			<language>en-us</language>
			<pubDate>Thu, 02 Sep 2010 11:16:43 -0600</pubDate>
			<lastBuildDate>Sat, 18 Nov 2006 21:28:00 -0600</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>support@honeyhousedesigns.com</managingEditor>
			<webMaster>support@honeyhousedesigns.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>support@honeyhousedesigns.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>The Honey House Buzz</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm</link>
			</image>
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>Caching Queries -- Duh Moment</title>
				<link>http://honeyhousedesigns.com/blog/index.cfm/2006/11/18/Caching-Queries--Duh-Mom</link>
				<description>
				
				In playing with caching CFMX queries, I kept bumping up against the scope of the cached query. If I created a cached query, but stored it in a CFC or UDF, I couldn&apos;t always get a page to refer to the recordset due to scoping limitations.

I wanted a query that only updates occaisionally or not at all (such as a list of states, or sales tax tables) but is available to all pages of my site w/o regard to the page.
I have to make sure the query is run and the values cached into a memory variable, such as request, or application in my application.cfc.

This worked perfectly, but in a complete DUH moment, I never realized that the query structure could also be referenced as a CFDUMP anywhere on my site.

In application.CFC:
&lt;code&gt;
&lt;cfquery name=&apos;foo&apos; datasource=&quot;#request.datasource#&quot; cachedwithin=&quot;#createTimeSpan(0,1,0,0)#&quot;&gt;
  select * from snoo
&lt;/cfquery&gt;
&lt;cfset request.foorecords = foo&gt;
&lt;/code&gt;

or
&lt;code&gt;
&lt;cfset application.foorecords = foo&gt;
&lt;/code&gt;

Then in any other page that I need to call the variables, I can just use request.foorecords as the query. So
&lt;code&gt;
&lt;cfoutput query=&apos;request.foorecords&apos;&gt;
&lt;/code&gt;
&lt;code&gt;
&lt;cfloop query=&apos;request.foorecords&apos;&gt;
&lt;/code&gt;
Even 
&lt;code&gt;
&lt;cfdump=&apos;#request.foorecords#&apos;&gt; 
&lt;/code&gt; works!  DUH 
				</description>
				
				<category>Blonde Moments</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Sat, 18 Nov 2006 21:28:00 -0600</pubDate>
				<guid>http://honeyhousedesigns.com/blog/index.cfm/2006/11/18/Caching-Queries--Duh-Mom</guid>
				
			</item>
			</channel></rss>