Must I always have to restart the Tomcat server to clear out Velocity Template cache?

2k views Asked by At

What I am doing is directly modifying a .vm file in our Jira project on my test server trying to figure out a bug that we have. The reason why I am doing this directly on the server is because our project build time and start-up of the server is over 10 minutes for every build (thats another issue for another day).

After modifying the .vm file I have tried to clear out the cache on Tomcat by completely deleting the Catalina\localhost\projectName folder as well as the browser cache. This does not work and I am forced to shutdown the Tomcat server and restart and only then do the changes show up.

Sick of shutting down and starting back up to test each change I am making in the file to troubleshoot.

Is there another way I can do this?

1

There are 1 answers

6
Chris Gerken On BEST ANSWER

For debugging, you should be able to turn caching off. If you're loading templates as files, for example, you could set the following property in your config:

file.resource.loader.cache=false