Hash based ids for metainfo definitions
We want to support metainfo "versions" #549 (closed) soon. Here, it would be good if we had a unique id for definitions. For example, if a section would refer to its definition with
m_def='../uploads/<id>/archive/<id>#/section_definitions/0@c9b1b196, and we then load the respective definition, we should check if the definition is still
c9b1b196 or has changed in the mean time. When ever we create a reference like this, we use the current definition id.
This kinda id mechanism would also allow to keep a cache of definition across all versions and archives. We could then often ignore the actual url and simply search for an existing definition with the given "id", before attempting to load the url.
These ids would need to be hash-based to accurately represent the definition. If the definition is "different", its id needs to be different. Maybe only the actually defining property of each definition should go into this id. For example quantities and they type would be relevant, descriptions might not?
Wether we put the id in references or use a pair of m_def properties (e.g. m_def=url + m_def_id=id) could still be discussed
The hash needs to be fast enough to not slow down the initialisation of metainfo too much. Ideally, it would be created on-demand. It should only be created once and should be invalidated (or recreated) when the definition is changed.