I would instantiate the datasetCache in the cache.py file. So if their is multiple dataset used in the same process, they will share the same object.