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.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
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.
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.