The problem is that the document which is executed in the case of a /view/ action is a clone of the cache document, so the result of the preparation won't go in the cached document. Unfortunately we do need this XWikiDocument to be a clone for the sheet system to work properly (see XWIKI-20716) so it's not an easy fix. |