Caching ColdFusion Pages With Expires Header Value

<cfcomponent
	output="false"
	hint="I provide page request settings and application leve event handlers.">
 
	<!--- Define the application. --->
	<cfset THIS.Name = "expires-#Hash( GetCurrentTemplatePath() )#" />
	<cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 5, 0 ) />
 
 
	<cffunction
		name="OnApplicationStart"
		access="public"
		returntype="boolean"
		output="false"
		hint="I initialize the application.">
 
		<!---
			Store the date / time that the application was
			initialized.
		--->
		<cfset APPLICATION.DateInitialized = Now() />
 
		<!---
			Create a numeric representation of the
			initialization date/time stamp. This will be used
			to version our linked assets.
		--->
		<cfset APPLICATION.VersionKey = (APPLICATION.DateInitialized * 1) />
 
		<!--- Return out. --->
		<cfreturn true />
	</cffunction>
 
 
	<cffunction
		name="OnRequestStart"
		access="public"
		returntype="boolean"
		output="false"
		hint="I initialize the page request.">
 
		<!--- Check to see if we need to initialize the app. --->
		<cfif StructKeyExists( URL, "reset" )>
 
			<!--- Manually execute initialization. --->
			<cfset THIS.OnApplicationStart() />
 
		</cfif>
 
 
		<!--- Define page request settings. --->
		<cfsetting showdebugoutput="false" />
 
		<!--- Return out. --->
		<cfreturn true />
	</cffunction>
 
</cfcomponent>

For Cut-and-Paste