BHoM / BHoM_Adapter

GNU Lesser General Public License v3.0
7 stars 5 forks source link

BHoM_Adapter: Add caching system for CRUD methods #336

Closed IsakNaslundBh closed 1 year ago

IsakNaslundBh commented 1 year ago

Description:

For some objects types pushing and or pulling of specific types can lead to the same object being read out multiple times during an action. To stop this from being an issue a caching system can be put in place that temporary stores the objects as they are being handled.

The cache should be emptied before each new action starts to ensure that there is no risk for it going out of sync with the model from for example manual tweaks, hence suggesting clearing it at the beginning and end of each action making use of it.

For real gain of this, all toolkits making use of the push methods in the main adapter needs to be updated. For example Reading bars should make sure the nodes are accessed through the caching.