From version < 8.1 >
edited by Thomas Mortagne
on 2019/12/10 17:15
To version < 9.1 >
edited by Thomas Mortagne
on 2019/12/10 17:17
< >
Change comment: There is no comment for this version



... ... @@ -30,7 +30,7 @@
30 30  {{/async}}
31 31  {{/code}}
32 32  
33 -Example 2 (if you want to include a page from another wiki):
33 +Example 2:
34 34  
35 35  {{code}}
36 36  {{async context="user"}}
cogAsynchronous and cached execution of wiki content.
Developed by

XWiki Development Team

0 Votes
LicenseGNU General Public License 1
Bundled With

XWiki Standard


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


From Wiki Syntax

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

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...). By default no specific information from the context is provided (even if there is a usable context provided to manipulate API which need one).
idyeslistgenerated to be unique for each macro callA unique id is automatically generated by default (based on the location of the macro) but it's possible to provide a custom one if needed (for example to share the result of an sync block between two different pages).


Example 1:

Some slow script.

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

Example 2:

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

Prerequisites & Installation Instructions

Since XWiki 11.6.

Get Connected