Last updated Sep 26, 2019

Disable Velocity caching

When you are developing plugins for Confluence, it can be useful to disable the caching of the Velocity templates so that you don't have to restart the server to see Velocity changes.

To disable Velocity template caching in Confluence:

  1. Stop Confluence.
  2. Edit <install-directory>/confluence/WEB-INF/classes/velocity.properties and make the following changes:
    1. On all the lines that end with ...resource.loader.cache, set the values to false.
    2. Set the class.resource.loader.cache to false (skip this step if this entry doesn't exist).
    3. Set velocimacro.library.autoreload to true (uncomment the line if necessary).
  3. Save the updated velocity.properties file. This file takes precedence over the one found in the Confluence JAR file.
  4. Restart Confluence.

Note that the Velocity macro libraries (macros.vm, menu\_macros.vm) are only loaded once, when Velocity starts.

This means that regardless of the caching settings above, any changes to these files will require restarting Confluence to take effect.

Rate this page: