def METHOD_NAME(self, project_name, thumbnail_id, content, mime_type):
    """Store thumbnail to cache folder.
    Args:
        project_name (str): Project where the thumbnail belong to.
        thumbnail_id (str): Id of thumbnail.
        content (bytes): Byte content of thumbnail file.
        mime_data (str): Type of content.
    Returns:
        str: Path to cached thumbnail image file.
    """
    if mime_type == "image/png":
        ext = ".png"
    elif mime_type == "image/jpeg":
        ext = ".jpeg"
    else:
        raise ValueError(
            "Unknown mime type for thumbnail \"{}\"".format(mime_type))
    project_dir = self.make_sure_project_dir_exists(project_name)
    thumbnail_path = os.path.join(project_dir, thumbnail_id + ext)
    with open(thumbnail_path, "wb") as stream:
        stream.write(content)
    current_time = time.time()
    os.utime(thumbnail_path, (current_time, current_time))
    return thumbnail_path