This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.
This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

Disable Velocity Caching

All Versions
Click for all versions
Confluence 2.10 Documentation

Index

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 your Velocity properties, which you will find in one of the following locations:
    • ./confluence/src/etc/java/velocity.properties, or
    • if you are using the webapp: /WEB-INF/classes/velocity.properties for Confluence 2.5 and earlier, or
    • confluence/WEB-INF/lib/confluence-[version].jar#velocity.properties for Confluence 2.6 and later.
  2. Set all the ...resource.loader.cache values to false.
  3. Set the class.resource.loader.cache to false. (If this entry does not exist, you can skip this step.)
  4. Set velocimacro.library.autoreload to true. (Uncomment the line if necessary.)

Unfortunately, this does not apply to the macro library (macros.vm). Hence, a restart is essential.

Labels

faq_conf_dev faq_conf_dev Delete
velocity-related velocity-related Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Apr 13, 2007

    Martin Cleaver says:

    Is there a way to tell confluence to just "reload now"? There doesn't seem to b...

    Is there a way to tell confluence to just "reload now"?

    There doesn't seem to be a means to do so via the soap client

    1. Apr 13, 2007

      Martin Cleaver says:

      Or can this be done by deleting the cached copy? Restarting the server is not an...

      Or can this be done by deleting the cached copy? Restarting the server is not an option for us.

      1. Apr 13, 2007

        Martin Cleaver says:

        No - there isnt such an option. Its either "cache on" or "cache off", there isn'...

        No - there isnt such an option. Its either "cache on" or "cache off",
        there isn't a "cache until I tell you".

        --
        Dan Hardiker
        Adaptavist.com Ltd

  2. Nov 06, 2007

    Anonymous says:

    Does this still page still have accurate information?  We are using the Con...

    Does this still page still have accurate information?  We are using the Confluence 2.6.x and while the VMD files and VM files seem to be reloaded on each change the macro files do not!?

    Can you please help, this is KILLING our productivity

    I have set the following in our velocity file....

    wwfile.resource.loader.cache=false
    wwclass.resource.loader.cache=false
    confclass.resource.loader.cache=false
    confhome.resource.loader.cache=false
    hibernate.resource.loader.cache=false
    confplugin.resource.loader.cache=false
    velocimacro.library.autoreload = true

    And while i'm at it?  Is there a better way to add a custom macro file to our plugin than to add it to the global velocity.properties file?

    We've done the following but it seems pretty intrusive.

    velocimacro.library=template/includes/macros.vm, template/includes/navlinkmacros.vm, org/us/custom/macros/macros.vm 

    1. Nov 14, 2007

      Mei Yan Chan says:

      Hi, Thanks for the report. I've proceeded to creating a bug report and it's cur...

      Hi,

      Thanks for the report. I've proceeded to creating a bug report and it's currently being tracked at:

      Feel free to add yourself as a watcher for future updates. We are currently looking into Velocity docs to see if there are any related issues.

      Regards,
      Mei

  3. Dec 03, 2007

    Naima Shaikh says:

    Hi, Is it possible to turn off caching altogether? If we can do that in our dev...

    Hi,

    Is it possible to turn off caching altogether? If we can do that in our devt environment, then changes to stylesheets can be reflected immediately.  I too tried the entries in the velocity.properties, but stylesheet changes are still cached.  Stopping/Restarting server is also not an option for us for each change.

    Thanks in advance for any insight.

    -naima 

    1. Dec 03, 2007

      Naima Shaikh says:

      Solved it.  Took the stylesheet out of the vm page, re-started once, and no...

      Solved it.  Took the stylesheet out of the vm page, re-started once, and now working like a dream.  I uninstall then upload the new version of the theme, and voila' - changes are reflected immediately.  Watch out for Firefox caching too!

      -naima

  4. Nov 30

    Anonymous says:

    The documentation should be updated to tell the user that (apparently as of 2.7 ...

    The documentation should be updated to tell the user that (apparently as of 2.7 but for sure in 2.9...) that file is in confluence/WEB-INF/lib/confluence-[version].jar#velocity.properties.

    1. Nov 30

      Sarah Maddox says:

      Fixed. Thank you Cheers — Sarah

      Fixed. Thank you
      Cheers — Sarah

Add Comment