Cached execution of functions in base classes
@ladinesa I would like your opinion on a feature we can work for base classes.
As of now, we have the MetainfoNormalizer
which will run over the normalize()
functions of each class inheriting from ArchiveSection
. When designing the base classes for simulations, I have in mind tho that users could call for functions whenever they want (e.g., during parsing). In order to avoid double execution of functions if they are called in normalize()
, do you think it makes sense to define something in m_cache
to do this? If so, how would you do it, i.e., would you do a flag like is_ran
or something similar to distinguish which function was ran?
I don't mind trying to implement something, but I think in this case it makes more sense if you do it.