cogAsynchronous and cached execution of wiki content.
TypeJAR
CategoryMacro
Developed by

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU General Public License 1
Bundled With

XWiki Standard

Description

This macro provide an easy way to execute asynchronously and/or cached wiki content.

Usage

From Wiki Syntax

{{async async="false" cached="true" context="user,doc.reference"}}
content
{{/async}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
asyncyestrue/falseyesEnable or disable asynchronous execution
cachedyestrue/falsefalseEnable or disable caching of the result of the macro content execution
contextyeslist The list of context elements needed for the execution (wiki, user, locale, request.base, doc.reference...)
idyeslistgenerated to be unique for each macro callA unique id is automatically generated by default but it's possible to provide a custom one if needed

Example

Example 1:

{{async}}
{{velocity}}
Some slow script.
{{/velocity}}
{{/async}}

Example 2 (if you want to include a page from another wiki):

{{async context="user"}}
{{velocity}}
Script that need the current user $xcontext.userReference
{{/velocity}}
{{/async}}

Prerequisites & Installation Instructions

Since XWiki 11.6.

Tags:
Created by Thomas Mortagne on 2019/07/19 15:56
    

Get Connected