Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. VincentMassol1 +XWiki.ThomasMortagne - Content
-
... ... @@ -104,7 +104,7 @@ 104 104 --> 105 105 {{/code}} 106 106 107 -Uncomment the following line by removing the {{code}}<!-- -->{{/code}} and add {{code}}URIEncoding="UTF-8"{{/code}} to it. ////Maybe give a comment too.//107 +Uncomment the following line by removing the {{code}}<!-- -->{{/code}} and add {{code}}URIEncoding="UTF-8"{{/code}} to it.Maybe give a comment too. 108 108 109 109 {{code}} 110 110 <!-- Activate ajp connector for apache proxy_ajp --> ... ... @@ -256,6 +256,18 @@ 256 256 257 257 You can force a page to refresh using ##refresh=1## in the URL. 258 258 259 +It's also possible to programmatically refresh any document cache using the following API: 260 + 261 +{{code language="java"}} 262 +@Inject 263 +private RenderingCache renderingCache; 264 + 265 +... 266 + 267 +renderingCache.flushWholeCache(); 268 +renderingCache.flushCache(new DocumentReference("xwiki", "MySpace", "MyCachedDocument")); 269 +{{/code}} 270 + 259 259 == Enabled using velocity in document content itself (XWiki 1.0 syntax only) == 260 260 261 261 You can add the following to their content to cache them after they are rendered. Note that the document is refreshed whenever the content of the document changes, and the cache takes into account the URL, so it is pretty safe to add a long cache duration for all documents that don't contain scripts gathering data from the wiki. For example to cache the rendered content for 60 seconds you would add: