| group of cffunctions to be included in nearly every page in an app |
That already suggests what the most efficient solution might be. As the functions seem to be global to the application, put them is a component and create an instance of the component in application scope within OnApplicationStart(). The following example assumes that the file TestComponent.cfc exists within the myCFC directory under the web root.
Assuming Application.cfc is in the web root wwwroot, put the following code in Application.cfc's OnApplicationStart():
<!--- Instantiate object. The application scope implies the object will be available to any page, anywhere in the application. --->
<cfset application.testObject=createobject("component", "mycfc.testcomponent")>
Save the following code as TestComponent.cfc within the directory wwwroot/myCFC/
<cfcomponent output="false">
<cffunction name="testFunction" returntype="string" output="false">
<cfargument name="arg" type="string" required="false" default="">
<cfreturn "Your message, '" & arguments.arg & "', has been received. The test succeeded.">
</cffunction>
</cfcomponent>
Create the test page, testAppObject.cfm, anywhere in the application. Put the following code in it:
<cfset testCallResult = application.testObject.testFunction("Karamba!")>
<cfoutput>#testCallResult#</cfoutput>