GroovyPagesTemplateEngine(STRING,STRING) clear cache

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

GroovyPagesTemplateEngine(STRING,STRING) clear cache

This post has NOT been accepted by the mailing list yet.

down vote
I am using GroovyPagesTemplateEngine in grails 3.2.8. But I am facing Cache problem while creating the createTemplate.

I am ataching the link along with this for further clarification.

Is there any soltuion for this?

def t = groovyPagesTemplateEngine.createTemplate(gsp,"sample")
def out = new StringWriter()
The above code works fine for the first time. But when the gsp value changes the template is created for the initial value of the GSP and not taking the new value. So I need a way to clear the cache and also groovyPagesTemplateEngine.clearPageCache() is not working . Using it in the service and getting the attrs(HashMap) value in taglib which always shows the old value and not the new gsp value.

Any Suggestions???