> I have a question about using cfcache with fusebox. If I have 
> an action like
> 
> <cfcase value="ShowSchedule">
> <cfinclude template="Query_SelectSchedule.cfm">
> <cfinclude template="Display_Schedule.cfm">
> </cfcase>
> 
> I want to use cfcache on Display_Schedule.cfm. The link would 
> be listed as index.cfm?action=ShowSchedule. If that is the case 
> then the query would run. Or would you put the cfcache tag in 
> both templates?
> 
> Or is this an instance where fusebox is not the way to go and 
> just combine the two templates into one page and have
> 
> <cfcase value="ShowSchedule">
> <cfinclude template="Query_Display_Schedule.cfm">
> </cfcase>

Although I'd argue that Fusebox is never the way to go (just kidding here,
I'm not trying to start a Fusebox flame war), there's no reason why you
can't use CFCACHE with Fusebox. If you only wanted to cache the page output
generated when using display_schedule.cfm, you could do this in index.cfm:

<cfcase value="ShowSchedule">
        <cfcache action="cache" timeout="#CreateTimeSpan(1,0,0,0)#"
cachedirectory="c:\somenonwebaccessibledirectory">
        <cfinclude template="Query_SelectSchedule.cfm">
        <cfinclude template="DisplaySchedule.cfm">
</cfcase>

Or, for even better results, use ACTION="OPTIMAL" in CF 4.5.1, which will
take advantage of browser caching if possible.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to