code: def insert(self, crc, toc):
          
          if self._rw_cache:
              try:
                  filename = '%s/%08X.json' % (self._rw_cache, crc)
                  cache = open(filename, 'w')
                  cache.write(json.dumps(toc, indent=2,
                                         default=self._encoder))
                  cache.close()
                  logger.info('Saved cache to [%s]', filename)
                  self._cache_files += [filename]
              except Exception as exp:
                  logger.warning('Could not save cache to file [%s]: %s',
                                 filename, str(exp))
          else:
              logger.warning('Could not save cache, no writable directory')
docs: Save a new cache to file