Disable the Asynchronous Rendering of the Caching Code Macro

Last modified by Vincent Massol on 2026/11/12 16:51

Steps

Make the Caching Code Macro highlight the code while the page is rendered, instead of in the background. The result is still cached.

  1. Add the following line to the WEB-INF/xwiki.properties file of your XWiki installation:
    codecached.async = false
  2. Restart XWiki.
  3. Open a page holding a code macro that was never displayed before. The highlighted code is shown with the page, without a delay.

    A page whose code macro is displayed with its highlighted code on the first display

FAQ

How do I go back to the asynchronous rendering?

Remove the line, or set it to true, the default, and restart XWiki.

Get Connected