def load_cache(self, file): import json try: with open(file, 'r') as f: self.cache = json.load(f) except: # Fail silently pass