XWIKI-23011 adds caching for a given XDOM, so it's cached if the XDOM in which the code macro call is located is cached (for example a document content).
Keeping this issue open for now until we decide if it's good enough or not. Going through the preparation system is the safest and the cleanest, but it also means that it depends a lot on the location of the code macro (i.e. is that location is itself cached).
Thomas Mortagne on 21/Mar/25 16:02
XWIKI-23011 adds caching for a given XDOM, so it's cached if the XDOM in which the code macro call is located is cached (for example a document content).
Keeping this issue open for now until we decide if it's good enough or not. Going through the preparation system is the safest and the cleanest, but it also means that it depends a lot on the location of the code macro (i.e. is that location is itself cached, and prepared in case the code macro call is inside another macro content).
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.