Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clear template cache on domain reload

  • Loading branch information...
commit e4a6f105df177a868d1d16468a8908a411255da7 1 parent 1dd5cf8
graemerocher graemerocher authored
7 ...caffolding/src/main/groovy/org/codehaus/groovy/grails/plugins/scaffolding/ScaffoldingGrailsPlugin.groovy
View
@@ -34,7 +34,8 @@ import org.codehaus.groovy.control.CompilerConfiguration
import org.codehaus.groovy.control.customizers.ASTTransformationCustomizer
import org.codehaus.groovy.grails.compiler.injection.NamedArtefactTypeAstTransformation
import org.codehaus.groovy.grails.commons.ControllerArtefactHandler
-import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
+import org.springframework.beans.factory.config.AutowireCapableBeanFactory
+import org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer;
/**
* Handles the configuration of dynamic scaffolding in Grails.
@@ -141,6 +142,10 @@ class ScaffoldingGrailsPlugin {
def onChange = { event ->
ScaffoldingViewResolver.clearViewCache()
+ if(event.ctx?.groovyPagesTemplateRenderer) {
+ GroovyPagesTemplateRenderer renderer = event.ctx?.groovyPagesTemplateRenderer
+ renderer.clearCache()
+ }
if (event.source && application.isControllerClass(event.source)) {
GrailsControllerClass controllerClass = application.getControllerClass(event.source.name)
configureScaffoldingController(event.ctx, event.application, controllerClass)
Please sign in to comment.
Something went wrong with that request. Please try again.