Split Cache and JCache into objects and move them into cache.py so they can be loaded without shared.py