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

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

0
down vote
favorite
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. http://grails.1312388.n4.nabble.com/GroovyPagesTemplateEngine-GSP-related-re-design-needed-td3215501.html

Is there any soltuion for this?

def t = groovyPagesTemplateEngine.createTemplate(gsp,"sample")
def out = new StringWriter()
t.make(model).writeTo(out)
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???

Thanks