This page last changed on Nov 01, 2006 by mryall.

When you are developing for Confluence, it is often useful to disable the caching of the velocity templates so that you don't have to restart the server to see velocity changes.

Perform the following modifications before starting the server, or restart it afterwards:

  1. Edit ./confluence/src/etc/java/velocity.properties (or /WEB-INF/classes/velocity.properties if you are using the webapp).
  2. Set all the "...resource.loader.cache" values to false.
  3. Set the "class.resource.loader.cache" to false.
  4. Set "velocimacro.library.autoreload" to true (uncomment the line if necessary).

This will allow even the macro library (macros.vm) to reload automatically.

Ah, handy to know. It would be nice if uploading a plugin flushed the cache (or at least any velocity resources in the plugin), since this rendered uploaded plugins using velocity almost useless - currenly you require a server restart to get it loading the new velocity file...

Posted by david@randombits.org at Nov 07, 2005 21:37

Looks like we may already do this. Take a look at the class: ConfluenceVelocityResourceCachePluginListener.

Posted by jnolen at Nov 08, 2005 12:24

Hmm...I think this is a 2.0 addition? I can't find it in the API or current source.

But if so, great

Posted by david@randombits.org at Nov 08, 2005 19:55

It must be a 2.0 thing as I've never seen any evidence of the velocity cache being flushed when uploading macros to 1.4.x

Posted by gfraser at Nov 09, 2005 05:36

This doesn't seem to work any more in 2.2.x. Any ideas?

Posted by david@randombits.org at Oct 03, 2006 21:44

Do you mean you can't find the Velocity properties file David ? mine is in the following location if that helps... 

(scuse the really bad file path...  )

c:\confluence\confluence-2.2.9-std\confluence\WEB-INF\classes\velocity.properties

Posted by ian75 at Nov 09, 2006 09:01

Yeah, I knew where the file was. I thought that my changes to the 'cache' properties weren't having any effect, but it turned out they were only failing in one situation: if you had a .vm file being used as a CSS file. This is still the case, and is also quite annoying, but I can live with it if that's the only problem...

Posted by david@randombits.org at Nov 09, 2006 09:28
Document generated by Confluence on Mar 22, 2007 21:01