You are looking at documentation for an older release. Not what you want? See the current release documentation.
This plugin is used to list the macros which must not be cached.
This is required for macros generating dynamic content (meaning the content generated by the macro can change even if the wiki page source is not updated).
Generated HTML version of Wiki pages are cached to avoid generating it again at each display.
If a page contains macros producing dynamic content, its HTML version must not be cached to be sure it is always up to date.
For example the rss macro provides new content as soon as new articles are published on the remote website, so it must be listed as an uncached macro.
The default configuration of this plugin can be found in wiki-service/src/main/resources/conf/portal/cache-configuration.xml
.
Sample configuration:
<external-component-plugins>
<target-component>org.exoplatform.wiki.service.WikiService</target-component>
<component-plugin>
<name>addUnCachedMacro</name>
<set-method>addUnCachedMacro</set-method>
<type>org.exoplatform.wiki.rendering.cache.UnCachedMacroPlugin</type>
<description>Add the uncached macro list</description>
<init-params>
<values-param>
<name>uncachedMacroes</name>
<value>rss</value>
<value>jira</value>
</values-param>
</init-params>
</component-plugin>
</external-component-plugins>
In which:
Name: addUnCachedMacro
Set-method: addUnCachedMacro
Type: org.exoplatform.wiki.rendering.cache.UnCachedMacroPlugin
Init-params
Name | Type | Default value | Description |
---|---|---|---|
uncachedMacroes |
String
|
rss, jira
|
The list of uncached macros. |