I have made a Python toolbox which processes relatively large polyline feature class (millions of features), builds a network graph from it as dictionary of lists, and depending on user selected features in map finds shortest paths between selected features and creates a new selection of these shortest paths. This tool is used repeatedly in one of our workflows. I would love to keep the "network graph" as dictionary of lists in memory. I am aware of in_memory workspace and possibility to convert my dictionary into table and store it like that there.
I wonder if there is some way to save directly Python objects into generally accessible space (variable) in memory in ArcGIS Pro from Python toolbox?
Something like in_memory workspace but directly for Python objects (variables). In my particular case so I can check if this dictionary of lists exists and potentially reuse it if object meets the user settings and other requirements, when the tool is rerun?