What does the MACH_CONFIG_MODE variable in the index.cfm file of the skeleton or my Application.cfc do?

This variables tells Mach-II when the configuration file (mach-ii.xml) should be reloaded to reconfigure your application components and model. The MACH_CONFIG_MODE variable takes the following values:

MACHII_CONFIG_MODE

Value Meaning Description Recommended For Not Recommended For
-1 Never reload Does not reload the mach-ii.xml configuration file - Production environments - Development environments
0 Dynamic reload Reloads the configuration file whenever the base, includes or module XML config files is updated by automatically checking when the file was last modified and size of file. If a module or module include file changes, only that module is reloaded. - Development environments
1 Always reload Reloads the configuration for each request. Each time the configuration is reloaded, the application framework is reinstantiated. This means lots of object instances are created and the mach-ii.xml file is reread from file and reparsed. This also means any state information held in framework components (such as Listeners) will be reset if not persisted. - Development environments - debugging only Production environments (it results in significant performance penalties)

Back to FAQs