def METHOD_NAME(self, job_checksum, result):
    logger.info(_("Caching job result for job with checksum %s"),
                job_checksum)
    job_cache_path = os.path.join(self._get_cache_path(), job_checksum)
    if os.path.exists(job_cache_path):
        # this can happen if the loading failed, so let's clear the path
        try:
            shutil.rmtree(job_cache_path)
        except Exception as exc:
            logger.warning(
                _("Failed to remove path in Resource Cache: %s %s"),
                job_cache_path, exc)
            return
    os.makedirs(job_cache_path)
    cached_io_log_path = os.path.join(
        job_cache_path, os.path.basename(result['io_log_filename']))
    shutil.copyfile(result['io_log_filename'], cached_io_log_path)
    result['io_log_filename'] = cached_io_log_path
    data = json.dumps(
        result,
        ensure_ascii=False,
        sort_keys=True,
        indent=None,
        separators=(',', ':')
    ).encode("UTF-8")
    with open(os.path.join(job_cache_path, 'result.json'),
              'wb') as result_file:
        result_file.write(data)
    logger.debug(
        _("Wrote %s to %s"),
        data, os.path.join(job_cache_path, 'result.json'))
    self._cache[job_checksum] = result