velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject VelocityViewServlet and purging the template cache
Date Fri, 01 Jul 2011 01:47:34 GMT
All,

I'm using Velocity 1.4 (yeah, I know), and I'm not sure if it matters,
but I'm using VelocityLayoutServlet from tools 1.4.

In production, we have the following configuration in velocity.properties:

resource.loader=webapp
webapp.resource.loader.class=org.apache.velocity.tools.view.servlet.WebappLoader
webapp.resource.loader.cache=true
webapp.resource.loader.modificationCheckInterval=0

Occasionally, I'd like to have a single template re-loaded from the
disk. Is there a way to do that with a (privileged) HTTP call? If not,
is there a way to ask a Loader to purge a template from it's cache? If
so, I could build a template-purging servlet (or even augment
VelocityViewServlet) to do this and then protect it for admins only.

I'm wondering if anyone has done such a thing in the past, what their
experiences have been, and what their recommendations might be.

Thanks,
-chris


Mime
View raw message