Fix deprecated calls
[performances] Add a bit of caching to XWikiDocument