On Wed, Dec 5, 2012 at 3:29 PM, David Delbecq <david.delbecq(a)meteo.be>wrote;wrote:
Hello,
i have a specific wiki page that is quite slow to render because some
groovy code and macros in there are quite slow. Fortunately, content does
not change often, si i tried to make it faster for user by using cache
rendering.
Here is what is inside my xwiki.cfg:
xwiki.rendering.defaultCacheDuration=3600
And here is my xwiki.properties
core.renderingcache.enabled=true
core.renderingcache.documents=wiki:.*
core.renderingcache.size=200
# Default value is 300 (5 min).
# core.renderingcache.duration=300
I have also this inside my page:
{{velocity}}
$context.setCacheDuration(60)
//complex content here that has a custom groovy macro and a velocity
include
{{/velocity}}
{{groovy}}
System.out.println("***************************************phone menu not
in cache")
{{/groovy}}
And i see in my log that, everytime, the System.out is executed, meaning
the render cache is not used. What's my configuration problem? What did i
miss?
Note: using xwiki 4.1.2 and the url i try is
http://server/xwiki/bin/view/MySpace/MyPage?menu=Test.Menu&xpage=plain
Thank you.
David Delbecq
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
Rendering cache works well for me.
First of all, not that your are mixing two different features here: what
you find in xwiki.cfg and $context.setCacheDuration() are old caching
system which is maintained for retro-compatibility reasons only in
xwiki/1.0 syntax.
Now about the more generic rendering cache located in xwiki.properties, is
your wiki name really "wiki" ? Because here you indicated that you wanted
to cache all the pages in the wiki which has "wiki" as identifier. If you
are in a single wiki mode (XWiki Enterprise for example) you can simply
remove the wiki part as in
core.renderingcache.documents=Space.Page
--
Thomas Mortagne