4

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 Answers 2

5

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.

1
  • I'd give a double upvote for this, if possible ;) Very nice answer!
    – Ida
    Commented Mar 13, 2013 at 9:02
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.