Optional Store Features
Reference
Two of the things the store keeps can be switched off, and where it keeps them can be changed: the history of documents and attachments, and the recycle bins they go to when deleted. All of the properties below live in xwiki/WEB-INF/xwiki.cfg, all of them ship commented out at the default shown, and all of them are read at startup, so a change takes effect on the next restart.
Keeping the full history is what lets a reader revert vandalism or read what a page said last month, and on an active wiki that history grows to be far larger than the current content. Switching it off is a trade of that safety for that space.
Features that can be switched off
| Property | Default | Switching it off means |
|---|---|---|
| xwiki.store.versioning | 1 | Documents no longer keep a history. |
| xwiki.store.attachment.versioning | 1 | Attachments no longer keep their versions. Setting xwiki.store.attachment.versioning.hint to void has the same effect. |
| xwiki.recyclebin | 1 | A deleted page is removed instead of going to the recycle bin. |
| storage.attachment.recyclebin | 1 | A deleted attachment is removed instead of going to the attachment recycle bin. |
| xwiki.store.rollbackattachmentwithdocuments | 1 | Reverting a document to an older version leaves its attachments as they are. |
Two traps in that table:
- Only the exact value 0 switches off the first four. They are read as "anything that is not 0", so false, no or off leave the feature on.
- The last one is the other way round: only the exact value 1 keeps it on, so any other value switches it off.
And note that storage.attachment.recyclebin is the one property here without the xwiki. prefix.
Where each of them is stored
Each store has a hint that selects its implementation. The metadata stores default to the database, the content stores to the permanent directory, the latter since XWiki 10.5.
| Property | Default | What it stores |
|---|---|---|
| xwiki.store.versioning.hint | hibernate | The history of documents. |
| xwiki.store.recyclebin.hint | hibernate | The metadata of deleted pages. |
| xwiki.store.recyclebin.content.hint | file | The content of deleted pages. |
| xwiki.store.attachment.recyclebin.hint | hibernate | The metadata of deleted attachments. |
| xwiki.store.attachment.recyclebin.content.hint | file | The content of deleted attachments. |
| xwiki.store.attachment.versioning.hint | file | The versions of attachments, or nothing at all with the value void. |
The two content hints apply to what is deleted after the change: they are read when a page or an attachment is deleted, so what is already in a recycle bin stays where it was written. Where the current documents and attachments are stored is a separate matter. See Blob Store.
FAQ
Can these be set per wiki?
No. They are xwiki.cfg properties of the instance, and no wiki-level field overrides them.
Does switching versioning off remove the history already stored?
No. Nothing deletes what was written; new versions simply stop being added, so the history a page already has stays readable.
Related
- XAR Export as a Backup Method, which carries neither the history nor the recycle bins.
- Attachments Tab in Page Extra Area.