Do as many copies as the number of revisions exist

2019-02-18 15:10发布

In plone, how many physical copies of a file (or any content) exist if it is revised say 4 times? I am using plone 4.1 wherein the files and images are stored on the file system.

2条回答
该账号已被封号
2楼-- · 2019-02-18 15:41

Content objects consist of multiple persistent records. For images and files that includes the binary blob file on the file system.

When a content object is changed, only the persistent records that are affected by the change are written as part of the transaction. Older records are not cleared at that moment, so you do get multiple copies, yes.

So each time you change the binary content of a file or an image, a new copy is created with that new data, and the old version is retained. If, however, you only change the title, or the publication date, the blob file is untouched, you won't end up with an extra copy of otherwise unchanged data.

You use ZODB packing to remove old transaction data. Note that by packing, you also remove the ability to undo changes for which the old state has been removed by a pack.

查看更多
Melony?
3楼-- · 2019-02-18 15:53

If you change the content in any way (or just re-save it) a duplicate of the object is created (which allows you to undo later). If you change only the metadata (like the title) the object is usually not duplicated.

These duplicated "backup" copies are removed (and the undo option for them) whenever the database is packed.

There rules dependent on the object being persistent: that's almost all normal Zope (and Plone) objects. Some exceptions may exist, but they are rare.

查看更多
登录 后发表回答