code: def from_file(cls, file, *args, **kwargs):
          
          try:
              cache = shelve.open(file)
              return cls(file, cache, *args, **kwargs)
          except OSError as e:
              logger.debug("Loading {0} failed".format(file))
              raise e
docs: Try loading given cache file.