Changes for page Cache
Last modified by Thomas Mortagne on 2018/05/30 10:38
From version 26.1
edited by Thomas Mortagne
on 2018/05/30 10:29
on 2018/05/30 10:29
Change comment:
There is no comment for this version
To version 27.1
edited by Thomas Mortagne
on 2018/05/30 10:29
on 2018/05/30 10:29
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,7 +1,7 @@ 1 1 {{groovy}} 2 - vardocumentReference = 'FlamingoThemes.Iceberg'2 +def documentReference = 'FlamingoThemes.Iceberg' 3 3 4 -de vdocumentInfos(document) {4 +def documentInfos(document) { 5 5 println 'isnew' + document.isNew() 6 6 println 'document title size:' + document.title.length() 7 7 println 'document content size:' + document.content.length() ... ... @@ -17,8 +17,8 @@ 17 17 } 18 18 } 19 19 20 - varprotectedXWiki = xwiki.getXWiki()21 - varcachedDocument = protectedXWiki.getDocument(documentReference, xcontext.context)20 +def protectedXWiki = xwiki.getXWiki() 21 +def cachedDocument = protectedXWiki.getDocument(documentReference, xcontext.context) 22 22 23 23 println '= Cached document' 24 24 ... ... @@ -30,7 +30,7 @@ 30 30 31 31 println '= Database document' 32 32 33 - vardatabaseDocument = protectedXWiki.hibernateStore.loadXWikiDoc(new com.xpn.xwiki.doc.XWikiDocument(documentReference), xcontext.context)33 +def databaseDocument = protectedXWiki.hibernateStore.loadXWikiDoc(new com.xpn.xwiki.doc.XWikiDocument(documentReference), xcontext.context) 34 34 35 35 documentInfos(databaseDocument) 36 36 {{/groovy}}