(cls, fileobj, timeout, domain, restore_user_id)
return cls(name)
Save restore response for later

        :param fileobj: A file-like object.
        :param timeout: Minimum content expiration in seconds.
        :returns: A new `CachedResponse` pointing to the saved content.
Save restore response for later
Save restore response for later
def save_for_later(cls, fileobj, timeout, domain, restore_user_id):
        """Save restore response for later

        :param fileobj: A file-like object.
        :param timeout: Minimum content expiration in seconds.
        :returns: A new `CachedResponse` pointing to the saved content.
        """
        name = 'restore-{}.xml'.format(uuid4().hex)
        get_blob_db().put(
            NoClose(fileobj),
            domain=domain,
            parent_id=restore_user_id,
            type_code=CODES.restore,
            key=name,
            timeout=max(timeout // 60, 60),
        )
        return cls(name)
def save_for_later ( cls , fileobj , timeout , domain , restore_user_id ) : name = 'restore-{}.xml' . format ( uuid4 ( ) . hex ) get_blob_db ( ) . put ( NoClose ( fileobj ) , domain = domain , parent_id = restore_user_id , type_code = CODES . restore , key = name , timeout = max ( timeout // 60 , 60 ) , ) return cls ( name )