Soft References In ColdFusion

<cfcomponent
	output="false"
	hint="I set up the application and define event handlers.">
 
	<!--- Define application settings. --->
	<cfset THIS.Name = "SoftReferenceDemo" />
	<cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 5, 0 ) />
 
	<!--- Define page settings. --->
	<cfsetting
		showdebugoutput="false"
		requesttimeout="10"
		/>
 
 
	<cffunction
		name="OnApplicationStart"
		access="public"
		returntype="boolean"
		output="false"
		hint="I run when the application starts up. If I return false, the application will not initialize.">
 
		<!--- Clear the application scope. --->
		<cfset StructClear( APPLICATION ) />
 
		<!--- Keep a log of messages. --->
		<cfset APPLICATION.Log = [] />
 
		<!--- Return out. --->
		<cfreturn true />
	</cffunction>
 
 
	<cffunction
		name="OnRequestStart"
		access="public"
		returntype="boolean"
		output="false"
		hint="I run before the requested template gets processed. If I return false, the page will not load.">
 
		<!--- Define arguments. --->
		<cfargument
			name="Page"
			type="string"
			required="true"
			hint="I am the template requested by the user."
			/>
 
		<!--- Check to see if the re-init method was called. --->
		<cfif StructKeyExists( URL, "reset" )>
 
			<!---
				The user has requested that the application
				be reset - execute this function manually.
			--->
			<cfset THIS.OnApplicationStart() />
 
		</cfif>
 
		<!--- Return out. --->
		<cfreturn true />
	</cffunction>
 
</cfcomponent>

For Cut-and-Paste