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
Change comment: There is no comment for this version
To version 27.1
edited by Thomas Mortagne
on 2018/05/30 10:29
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,7 +1,7 @@
1 1  {{groovy}}
2 -var documentReference = 'FlamingoThemes.Iceberg'
2 +def documentReference = 'FlamingoThemes.Iceberg'
3 3  
4 -dev documentInfos(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 -var protectedXWiki = xwiki.getXWiki()
21 -var cachedDocument = 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 -var databaseDocument = 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}}