May 2, 2007 · By Gert Franz · No Comments
Railo 1.1 offers a new way of handling and more flexibility with auto include files. Auto include files for CFMX are application.cfm, application.cfc and onRequestEnd.cfmIn the Railo administrator you will find a new Menu entry labelled "Application" which takes care of the following:
Script protect, Request Timeout and Applicaion listener.
The application listener will allow you to define the type and the mode of auto include files. The following options are available:
|Type of application listeners:|
|None||No auto include file will be executed|
|Classic CFML < 7||Only Application.cfm and OnRequestEnd.cfm will be executed.|
|Modern||Only Application.cfc will be included|
|Mixed||If Application.cfc is not found, Application.cfm and OnRequestEnd.cfm will be executed.|
Searching for the auto include files can consume time, since wich each request some file and directory operations are necessary. So you can improve performance by applying only the rule you see fit.
|Mode of application listeners:|
|Current||Looks for the auto include files only in the current (called) directory|
|Root||Looks for the auto include files only in the webroot directory|
|CurrToRoot||CFML standard. This setting looks for the files from the current directory up to the root|
By playing with these settings you sure can gain a little performance. Important to note is, that Railo handles mappings like directories. So you could define for instance three different mappings like:
Now, when you execute a template that can be reached with the URL http://.../myapp/custom/templates/myTemplate.cfm, Railo scans the following directories for auto include in the following order:
And not first in d:\custom_files\templates and then in d:\custom_files and then in d:\! Other engines do it in exact this way. This could cause unexpected problems. If for instance somebody places an Application.cfm into the folder D:\ then an Application.cfm in the webroot will never would be considered when a file from the mapping /myApp/custom/templates would be called.
Tags: Features · New release · Performance · Railo 1.1