Adobe ColdFusion (and Railo) compiles CFML templates into JVM bytecode and, if configured, writes the compiled classes to disk as .class files. The template cache is a mechanism for saying: if the target class is already loaded, do not look at the file (source) on the disk to see if it needs recompilation - trust what is in memory.
Recent improvements to ACF and Railo allow you to indicate that (source) files can always be checked (not trusted), once per request, never (always trusted).
This should not be news to everyone.
Obviously, ACF and Railo will compile any .cfm or .cfc file that will be asked to process so that they "fall" into the trusted cache, if it is enabled.
If you include a file - any file - ACF and Railo will also compile this into the JVM bytecode (and create a .class file on disk, if configured for this). Since the compiled file is compiled, it will also โendโ in the trusted cache. What happens if you include a CSS file? It compiles to bytecode, which outputs the entire contents of the CSS file as a string into the response stream. Since this is a compiled class that now outputs a hard-coded string, if you change the CSS source file and include the trusted cache, ACF and Railo will trust that in the class loader and not recompile it (it is assumed that the source is never checked by admin setting).
You can verify this by clearing the cfclasses folder, restarting your CFML engine, and running the code. You will see a .class file for your CSS file (assuming you saved the class files to disk).
So, cfinclude force compiles โanyโ file and the usual rules of the trusted cache apply to classes loaded into memory.
I no longer use ACF, so I canโt talk in detail about .cfr files (Railo does not support report files), but this will most likely depend on whether the ACF compiles the .cfr file or not. This should be easy to verify (by looking at the cfclasses folder).
source share