Template Caching
CodeSmith Generator caches compiled templates to make generation faster. If a template and its dependencies haven't changed since it was last compiled, Generator renders the output with the compiled assembly from the cache instead of compiling the template again.
When the cache is used
Generator uses the cached assembly only if nothing that goes into the template has changed. To decide, it checks the source code of the template, and recurses into the templates, source files and assemblies the template references through Assembly and Register directives.
Templates in debug mode (Debug="True" in the CodeTemplate directive) are always compiled and never loaded from the cache.
Why it matters
Caching helps most when you run the same template over and over without editing it. Running a template from Template Explorer is quicker (the property grid opens sooner), but the real benefit is in automated generation: running Generator projects or the console application as part of your build is substantially faster.
Where the cache is stored
The cache is stored in your local application data folder, for example %LOCALAPPDATA%\CodeSmith\v8.5\TemplateCache. To use a different folder, change TemplateCacheDirectory in the Paths category of the Engine page of the Options dialog.
Clearing the cache
Generator removes cache entries that are no longer valid each time it runs, so you rarely need to clear the cache yourself. If you do, run the console application with the /clearcache switch:
cs.exe /clearcache
This clears all cached template and property entries.