How diagrams are saved
Worth five minutes if you ever need to debug a diagram, migrate one, or explain the storage model to a security reviewer.
#A save writes in two places
#The two records
Record | Holds | Lives |
|---|---|---|
Custom content | The diagram source itself, plus its language. | In your Confluence site, attached to the page. |
The macro on the page | A pointer to that source, its title, and a hash of it. | In the page body. |
The hash is how the page knows whether the picture it is showing still matches the source. If they disagree, the diagram is re-rendered rather than showing something stale.
This is also why diagrams survive an uninstall. The source is ordinary Confluence content in your own site, so it is backed up, restored and exported with everything else.
#A few things that follow from this
Copying a page copies the source too, so the copy is independent. Editing one does not change the other.
Deleting a page deletes its diagram source with it, the same as any attachment.
Page permissions govern the diagram. If you can read the page, you can see the diagram. See Security and privacy.
#Related
Two records, one truth, kept in step by a hash.
